The method being called here looks like:

public SQLException genWrappedException(Throwable e) {
    return new SQLException(toString(), code.getSQLState(), e);
 }

So the original exception is being wrapped inside this exception, we merely add in the SQLState and a better error message.