|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
dods.dap.DODSException
Holds an exception thrown by DODS server to a client.
Unlike the other DODS exceptions, this one contains extra methods to
get the various fields sent by the server, and a parse method
to parse the Error sent from the server.
DODSException,
Serialized Form| Field Summary | |
static int |
CANNOT_READ_FILE
The file specified by the DODS URL can not be read. |
static int |
JAVA_PROGRAM
This Error contains Java bytecode. |
static int |
MALFORMED_EXPR
The expression specified in the DODS URL is not valid. |
static int |
NO_AUTHORIZATION
The user has no authorization to read the DODS URL. |
static int |
NO_PROGRAM
This Error does not contain a program. |
static int |
NO_SUCH_FILE
The file specified by the DODS URL does not exist. |
static int |
NO_SUCH_VARIABLE
The variable specified in the DODS URL does not exist. |
static int |
TCL_PROGRAM
This Error contains TCL code. |
static int |
UNDEFINED_ERROR
Undefined error. |
static int |
UNDEFINED_PROG_TYPE
Undefined program type. |
static int |
UNKNOWN_ERROR
Unknown error. |
| Fields inherited from class java.lang.Exception |
|
| Constructor Summary | |
DODSException()
Construct an empty DODSException. |
|
DODSException(int code,
String msg)
Construct a DODSException with the given message. |
|
DODSException(String msg)
Construct a DODSException. |
|
| Method Summary | |
int |
getErrorCode()
Returns the error code. |
String |
getErrorMessage()
Returns the error message. |
String |
getMessage()
Returns the detail message of this throwable object. |
String |
getProgramSource()
Returns the program source. |
int |
getProgramType()
Returns the program type. |
void |
parse(InputStream is)
Reads an Error description from the named InputStream. |
void |
print(OutputStream os)
Print the Error message on the given OutputStream. |
void |
print(PrintWriter os)
Print the Error message on the given PrintWriter. |
void |
setErrorCode(int code)
Sets the error code. |
void |
setErrorMessage(String msg)
Sets the error message. |
void |
setProgramSource(String source)
Sets the program source. |
void |
setProgramType(int type)
Sets the program type. |
| 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 |
public static final int UNDEFINED_ERROR
public static final int UNKNOWN_ERROR
public static final int NO_SUCH_FILE
public static final int NO_SUCH_VARIABLE
public static final int MALFORMED_EXPR
public static final int NO_AUTHORIZATION
public static final int CANNOT_READ_FILE
public static final int UNDEFINED_PROG_TYPE
public static final int NO_PROGRAM
public static final int JAVA_PROGRAM
public static final int TCL_PROGRAM
| Constructor Detail |
public DODSException()
DODSException.
public DODSException(String msg)
DODSException.
public DODSException(int code,
String msg)
DODSException with the given message.
code - the error coremsg - the error message| Method Detail |
public final int getErrorCode()
public final String getErrorMessage()
public final int getProgramType()
public final String getProgramSource()
public String getMessage()
public final void setErrorCode(int code)
code - the error code.public final void setErrorMessage(String msg)
msg - the error message.public final void setProgramType(int type)
type - the program type.public final void setProgramSource(String source)
source - the program source.public final void parse(InputStream is)
Error, and regenerate it as a DODSException.
is - the InputStream containing the Error to parse.ErrorParserpublic void print(PrintWriter os)
PrintWriter.
This code can be used by servlets to throw DODSException to client.
os - the PrintWriter to use for output.public final void print(OutputStream os)
OutputStream.
os - the OutputStream to use for output.print(PrintWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||