public static DbException wrapException(String sql,Exception ex){
  SQLException e=DbException.toSQLException(ex);
  return DbException.get(ErrorCode.ERROR_ACCESSING_LINKED_TABLE_2,e,sql,e.toString());
}

public static DbException wrapException ( String sql , Exception ex ) { SQLException e = DbException . toSQLException ( ex ) ; return DbException . get ( ErrorCode . ERROR_ACCESSING_LINKED_TABLE_2 , e , sql , e . toString ( ) ) ; }
wrap a sql exception that occurred while accessing a linked table .
