1 package com.daffodilwoods.database.general; 2 3 import java.sql.*; 4 import com.daffodilwoods.database.resource.*; 5 public class DatabaseException extends DException{ 6 7 private DatabaseException databaseException; 8 9 public DatabaseException(String sqlCode, Object [] parameters, DException temp) { 10 super(sqlCode, parameters); 11 this.prevException = temp; 12 } 13 14 public DatabaseException(String sqlCode, Object [] parameters) { 15 super(sqlCode, parameters); 16 } 17 18 public DException getPreviousException(){ 19 return (prevException==null) ? null : prevException; 20 } 21 22 23 public void setException( DatabaseException databaseException ) { 24 this.databaseException = databaseException; 25 } 26 27 public void printStackTrace() { 28 if(databaseException != null) 29 databaseException.printStackTrace(); 30 else 31 super.printStackTrace(); 32 } 33 34 public String getMessage(java.util.Locale locale) { 35 return super.getMessage(locale); 36 } 37 38 } 39 | Popular Tags |