org.brains2b.data
Class DataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.brains2b.data.DataException
All Implemented Interfaces:
java.io.Serializable

public class DataException
extends java.lang.Exception

Implementation of Exception for future use as default Exception in DataControl and DataController as replacement for the java.lang.Exception which is used in current versions.

Will be able to define the non specific data store errors by refering to a number only and will support multilanguage support in the future. The as CONSTANT defined error types will be added to. Therefor if you are going to use this, avoid the Numbers 0-9999.

Interface is not subject to change TODO Implement CONSTANTS en ResourceBundle for the non specific data store errors.

Version:
0.10 [16-02-2004]
Author:
dennis@brains2b.nl
See Also:
Serialized Form

Field Summary
static int RECORD_CHANGED
           
 
Constructor Summary
DataException()
          Constructor for DataException.
DataException(int errorNo)
          Constructor
DataException(java.lang.String message)
          Constructor for DataException.
 
Method Summary
 int getErrorNo()
          get the error number for this Exception
 java.lang.String getMessage()
          get the Message for this Exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RECORD_CHANGED

public static final int RECORD_CHANGED
See Also:
Constant Field Values
Constructor Detail

DataException

public DataException()
Constructor for DataException.


DataException

public DataException(int errorNo)
Constructor

Parameters:
errorNo - int, the errorNo for this Exception. in future releases all numbers will be implemented as CONSTANT. Avoid using numbers between 0-9999 for your own error messages.

DataException

public DataException(java.lang.String message)
Constructor for DataException.

Parameters:
message - String, the message for this Exception, for future multilanguage support use only the DataException(int) constructor
Method Detail

getErrorNo

public int getErrorNo()
get the error number for this Exception

Returns:
int, the error number

getMessage

public java.lang.String getMessage()
get the Message for this Exception.

In future releases Exceptions which where created with an error number will lookup the appropriate message through a ResourceBundle implementation.

Overrides:
getMessage in class java.lang.Throwable
See Also:
Throwable.getMessage()