|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Throwable
java.lang.Error
au.gov.aao.drama.DramaError
public class DramaError
Objects of this class are used to convert a checked
DramaException to an unchecked expection. This allows methods
to be implemented which don't force the compiler to check if the
exception is handled.
DramaException are reproduced.
The following bit of code will catch a DramaException and convert it to a DramaError.
catch (DramaException e) {
throw new DramaError(e);
}
Thanks to Bruce Eckel's page here for some of these ideas.
DramaException,
DramaStatus,
DramaTask,
Serialized Form| Field Summary | |
|---|---|
static String |
RCSID
The RCS (ACMM) ID. |
| Constructor Summary | |
|---|---|
DramaError(DramaException e)
Creates a DRAMA Error (unchecked exception) object from a DramaException. |
|
DramaError(String detailString,
DramaStatus status)
Creates a DRAMA Error (unchecked exception) object, with the assocaited DRAMA status passed using a DramaStatus object. |
|
DramaError(String detailString,
int status)
Creates a DRAMA Error (unchecked exception) object, with the assocaited DRAMA status passed as an integer. |
|
| Method Summary | |
|---|---|
DramaStatus |
DramaStatus()
Return the DRAMA status code associated with an exception. |
protected int |
DramaStatusInt()
Return the DRAMA status code associated with an exception. |
DramaException |
GetDramaException()
Returns a reference to the underlying Drama Exception object |
static void |
main(String[] args)
|
void |
rethrow()
Re-throw the underlying exception. |
String |
toString()
Returns a string representation of a DRAMA Exception. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String RCSID
| Constructor Detail |
|---|
public DramaError(String detailString,
int status)
detailString - A string giving context for the error.status - The DRAMA Status code for the error. If this
exception is ever converted back to a DRAMA
error report, this code can be fetched and
associated with the DRAMA error report.
public DramaError(String detailString,
DramaStatus status)
detailString - A string giving context for the error.status - The DRAMA Status code for the error. If this
exception is ever converted back to a DRAMA
error report, this code can be fetched and
associated with the DRAMA error report.public DramaError(DramaException e)
e - The original (checked) exception.| Method Detail |
|---|
public DramaStatus DramaStatus()
protected int DramaStatusInt()
public String toString()
toString in class Throwablepublic DramaException GetDramaException()
public void rethrow()
throws DramaException
DramaException - The underlying exceptionpublic static void main(String[] args)
|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aaoepp.aao.gov.au.