public FBSQLException(ResourceException ex) { super(ex.getMessage(), ex.getErrorCode() != null ? ex.getErrorCode() : SQL_STATE_GENERAL_ERROR);   if (ex instanceof FBResourceException) {  FBResourceException rex = (FBResourceException)ex;  if (rex.getLinkedException() != null) original = rex.getLinkedException(); else original = rex;  } else original = ex;  message = "Resource Exception. " + ex.getMessage();
public FBSQLException(Exception ex) { super(ex.getMessage(), SQL_STATE_GENERAL_ERROR); original = ex; message = "Exception. " + ex.getMessage();
    public FBSQLException(ResourceException ex) {        super(ex.getMessage(),                 ex.getErrorCode() != null ? ex.getErrorCode() :                                           SQL_STATE_GENERAL_ERROR);                // try to unwrap wrapped exception        if (ex instanceof FBResourceException) {                        FBResourceException rex = (FBResourceException)ex;                        if (rex.getLinkedException() != null)                original = rex.getLinkedException();            else                original = rex;                        } else            original = ex;                    message = "Resource Exception. " + ex.getMessage();    }