1 64 65 package com.jcorporate.expresso.core.db; 66 67 72 73 import com.jcorporate.expresso.kernel.exception.ChainedException; 74 75 76 81 public class DBException 82 extends ChainedException { 83 84 85 private String dbMessage = null; 86 87 90 public DBException() { 91 super(); 92 } 93 94 97 public DBException(String s) { 98 super(s); 99 } 100 101 105 public DBException(String s, String newDBMessage) { 106 super(s); 107 dbMessage = newDBMessage; 108 } 109 110 115 public DBException(String s, Throwable t) { 116 super(s, t); 117 } 118 119 123 public DBException(Throwable t) { 124 super(t); 125 } 126 127 132 public String getDBMessage() { 133 return dbMessage; 134 } 135 136 141 public String getMessage() { 142 if (dbMessage == null) { 143 return super.getMessage(); 144 } 145 146 return super.getMessage() + ":" + dbMessage; 147 } 148 149 } 150 151 | Popular Tags |