public static String processDumpException(SQLException sqlException) throws SQLException {
        final String sqlState = sqlException.getSQLState();

        if (sqlState != null && StringUtils.equalsIgnoreCase(sqlState, "s1000")) {
            SQLException f = sqlException;
            StringBuilder s = new StringBuilder();
            s.append(f.getMessage());
            while ((f = f.getNextException()) != null) {
                s.append("\n").append(f.getMessage());
            }
            String str = s.toString();
            if (StringUtils.containsIgnoreCase(str, "dump is complete"))
                return str;
        }
        throw sqlException;
    }
public static String processDumpException ( SQLException sqlException ) throws SQLException { final String sqlState = sqlException . getSQLState ( ) ; if ( sqlState != null && StringUtils . equalsIgnoreCase ( sqlState , "s1000" ) ) { SQLException f = sqlException ; StringBuilder s = new StringBuilder ( ) ; s . append ( f . getMessage ( ) ) ; while ( ( f = f . getNextException ( ) ) != null ) { s . append ( "\n" ) . append ( f . getMessage ( ) ) ; } String str = s . toString ( ) ; if ( StringUtils . containsIgnoreCase ( str , "dump is complete" ) ) return str ; } throw sqlException ; }
Some databases (Sybase) throw exceptions during a database dump. This function processes that exception, and if it is that type, builds up the output of the command

@param sqlException The exception to analyze
@return The output of the dump command
@throws java.sql.SQLException If it was not a successful dump command's exception.