1 30 31 32 package org.hsqldb; 33 34 43 public class HsqlException extends Exception { 44 45 private String message; 46 private String state; 47 private int code; 48 49 54 public HsqlException(String message, String state, int code) { 55 56 this.message = message; 57 this.state = state; 58 this.code = code; 59 } 60 61 64 public HsqlException(Result r) { 65 66 this.message = r.getMainString(); 67 this.state = r.getSubString(); 68 this.code = r.getStatementID(); 69 } 70 71 public HsqlException(Throwable t, String errorState, int errorCode) { 72 73 this.message = t.toString(); 74 this.state = errorState; 75 this.code = errorCode; 76 } 77 78 81 public String getMessage() { 82 return message; 83 } 84 85 88 public String getSQLState() { 89 return state; 90 } 91 92 95 public int getErrorCode() { 96 return code; 97 } 98 } 99 | Popular Tags |