Database Management and Java

By Art Sulger

Dr. Dobb's Journal May 1997

public class DatabaseException extends Exception 
   { 
   public DatabaseException()
      {  
      super(); 
      }  
   public DatabaseException(String error) 
      { // you can make your exception be a gui dialog 
        // or a command line printout 
        // this invokes the system message 
        // then prints an error in the java console
      super(); System.out.println("Database error:" + error); }
      }

Example 7: DatabaseException class.

Back to Article


Copyright © 1997, Dr. Dobb's Journal