edu.sdsc.grid.io.srb
Class SRBException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by edu.sdsc.grid.io.srb.SRBException
All Implemented Interfaces:
java.io.Serializable

public class SRBException
extends java.io.IOException

This class encompasses the legacy errors that can be returned by the SRB server. When an exception occurs in the SRB server a negative integer will be returned by the server which corresponds to a certain error message. This class provides methods to read that value and/or look up the related error.

See Also:
Serialized Form

Constructor Summary
SRBException(int srbExceptionType)
          Construct an SRBException with an empty message of the specified type.
SRBException(java.lang.String message)
          Construct a SRBException.
SRBException(java.lang.String message, int srbExceptionType)
          Construct an SRBException.
 
Method Summary
 java.lang.String getStandardMessage()
           
static java.lang.String getStandardMessage(int srbExceptionType)
          Get the standard SRB error message for any error type.
 int getType()
           
 java.lang.String toString()
          Returns a string representation of the object.
 
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
 

Constructor Detail

SRBException

public SRBException(java.lang.String message)
Construct a SRBException. This constructor extracts the error type from the message string. The first line of the error message will generally have a negative integer at the end which is the SRB exception type.


SRBException

public SRBException(java.lang.String message,
                    int srbExceptionType)
Construct an SRBException.


SRBException

public SRBException(int srbExceptionType)
Construct an SRBException with an empty message of the specified type.

Method Detail

getType

public int getType()
Returns:
the SRB server error type.

getStandardMessage

public java.lang.String getStandardMessage()
Returns:
the standard SRB server error message of this error type.

getStandardMessage

public static java.lang.String getStandardMessage(int srbExceptionType)
Get the standard SRB error message for any error type.


toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Throwable