|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
edu.duke.cs.banjo.utility.BanjoException
Defines the exceptions that the application generates.
Details:
- To provide as much meaningful feedback to the user or developer, we use special
values for the different exceptions that the application may throw.
- (Developer) To add a new BanjoException, simply add a new constant corresponding
to the new exception to the BANJO class' Exception section.
- The BanjoErrorHandler class provides a generic high-level handling of the generated
exceptions, available to any GUI class that wants to use it.
Change History:
Created on Aug 12, 2004
Field Summary | |
(package private) int |
exceptionType
|
private java.lang.String |
message
|
private static long |
serialVersionUID
|
Fields inherited from class java.lang.Throwable |
|
Constructor Summary | |
BanjoException(BanjoException e)
Constructor for propagating an existing BanjoException. |
|
BanjoException(java.lang.Exception e,
int exceptionType)
Contructor that handles an exception within the code, for which we didn't attach an additional message. |
|
BanjoException(java.lang.Exception e,
int exceptionType,
java.lang.String customMessage)
For trapping an existing exception, and attaching both a type and a message to it. |
|
BanjoException(int exceptionType)
Basic Constructor: creates a BanjoException of one of our defined types. |
|
BanjoException(int exceptionType,
java.lang.Object exceptionInfo,
java.lang.Object exceptionLocation)
|
|
BanjoException(int exceptionType,
java.lang.String customMessage)
Is used when we didn't encounter an exception in the code, but rather want to flag an "issue" (e.g., unusable input value, etc) |
Method Summary | |
int |
getExceptionType()
|
java.lang.String |
getMessage()
|
void |
setMessage(java.lang.String message)
|
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 |
private java.lang.String message
private static final long serialVersionUID
final int exceptionType
Constructor Detail |
public BanjoException(int exceptionType)
exceptionType
- The type of the BanjoException to set.public BanjoException(java.lang.Exception e, int exceptionType)
e
- The Exception that was originally encountered.exceptionType
- The type of the BanjoException to set.public BanjoException(java.lang.Exception e, int exceptionType, java.lang.String customMessage)
e
- The Exception that was encountered, and that triggered the
creation of this BanjoException. exceptionType
- The type of the BanjoException to set.customMessage
- The message to attach to the BanjoException.public BanjoException(BanjoException e)
e
- The BanjoException to propagate.public BanjoException(int exceptionType, java.lang.String customMessage)
exceptionType
- The type of the BanjoException to set.customMessage
- The message to attach to the BanjoException.public BanjoException(int exceptionType, java.lang.Object exceptionInfo, java.lang.Object exceptionLocation)
Method Detail |
public int getExceptionType()
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- The message to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |