|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
au.gov.aao.drama.DramaException
public class DramaException
Objects of this class are thrown when exceptions occur in
DramaStatus or
DramaStatusInt methods)
and hence determine how to respond to an exception.
A number of static methods are provided which help in the interaction
of DRAMA with Java. Two static methods -
Report(Throwable) and
Report(String) allow DRAMA
ERS reports
to be made. The former allows a JAVA Throwable to be reported to DRAMA,
say as part of an action reporting a JAVA Exception. The later allows
a string to be reported, without any chance of an Exception being thrown,
as might happen if
DramaErs.Report() was used. Similary,
for Flush() against
DramaErs.Flush().
DramaStatus,
DramaTask,
Serialized Form| Field Summary | |
|---|---|
static String |
RCSID
The RCS (ACMM) ID. |
| Constructor Summary | |
|---|---|
DramaException(String detailString,
DramaStatus status)
Creates a DRAMA Exception object, with the assocaited DRAMA status passed using a DramaStatus object. |
|
DramaException(String detailString,
int status)
Creates a DRAMA 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. |
static void |
Flush()
Flush ERS messages without return status to JAVA. |
static void |
Report(String s)
Report a string using ERS. |
static void |
Report(Throwable e)
Report a Java Throwable using ERS. |
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 DramaException(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 DramaException(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.| Method Detail |
|---|
public DramaStatus DramaStatus()
protected int DramaStatusInt()
public String toString()
toString in class Throwablepublic static void Report(String s)
DramaErs.Report(). This method
will not correctly handle reporting failures from ERS, because otherwise
it would have to throw exceptions. But this is unlikely to happen and
if it does, it will be reported to stderr.
s - The string to be reported.public static void Report(Throwable e)
e - The throwable to be reported.public static void Flush()
DramaErs.Flush()
method is that the later may itself report an exception whilst
this method won't - although it may report an error to stderr.
|
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.