lrgs.ldds.ServerError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opendcs Show documentation
Show all versions of opendcs Show documentation
A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.
The newest version!
/*
* $Id$
*
* $Source$
*
* $State$
*
* $Log$
* Revision 1.1 2008/04/04 18:21:15 cvs
* Added legacy code to repository
*
* Revision 1.6 2004/08/30 14:51:49 mjmaloney
* Javadocs
*
* Revision 1.5 2000/09/08 19:49:56 mike
* Release prep.
*
* Revision 1.4 2000/09/08 17:12:20 mike
* Truncate error message at first null byte.
*
* Revision 1.3 2000/03/31 16:09:57 mike
* Error codes are now in lrgs.common.LrgsErrorCode
*
* Revision 1.2 2000/01/19 14:34:52 mike
* Debug messages to detect garbage collection.
*
* Revision 1.1 2000/01/07 19:10:00 mike
* Generalizing client interface
*
*
*/
package lrgs.ldds;
import java.text.NumberFormat;
import java.text.ParsePosition;
import ilex.util.TextUtil;
import lrgs.common.LrgsErrorCode;
/**
ServerError is used by the client interfaces to the LRGS Data Server.
When the client receives an error message from the server in response
to a request, it will package the error info into a ServerError
exception object, and then throw it.
*/
public class ServerError extends Exception
{
public int Derrno, Errno;
public String msg;
/**
Create a ServerError exception from a string in the form:
?Derrno,Errno,text-message
...where Derrno and Errno are integers, and text-message is
an explantatory string provided by the server.
@param msg the message
*/
public ServerError(String msg)
{
// Initialize super class Exception with complete string
super(msg);
set(msg);
}
/**
Create a ServerError exception where Derrno and Errno are
explicitely set.
*/
public ServerError(String msg, int Derrno, int Errno)
{
this(msg);
this.Derrno = Derrno;
this.Errno = Errno;
}
public void set(String s)
{
// Initialize internal values.
Derrno = Errno = 0;
int i;
for(i=0; i