Here you can find the source of unboxException(SQLException exception)
public static SQLException unboxException(SQLException exception)
//package com.java2s; //License from project: Apache License import java.sql.SQLException; public class Main { public static SQLException unboxException(SQLException exception) { final Throwable cause = exception.getCause(); if (cause == null || !(cause instanceof RuntimeException)) { return exception; }/*w w w. j ava 2s . c om*/ SQLException unboxed = new SQLException(exception.getMessage()); unboxed.setStackTrace(exception.getStackTrace()); return unboxed; } }