org.apache.wsrp4j.exception
Class WSRPException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.wsrp4j.exception.WSRPException
All Implemented Interfaces:
java.io.Serializable

public class WSRPException
extends java.lang.Exception

Common Exception class within the WSRP environment

See Also:
Serialized Form

Constructor Summary
WSRPException()
           
WSRPException(int errorCode)
          Creates a new common excpetion.
WSRPException(int errorCode, java.lang.Throwable t)
          Creates a new common excpetion.
 
Method Summary
 int getErrorCode()
          Returns an error code
 int getExceptionRange()
          Returns the range identifier of this exception.
 java.lang.Throwable getNestedThrowable()
          Returns a nested Throwable
 void setCommonExceptionRange()
          Assign the exception to the common range
 void setConsumerExceptionRange()
          Assign the exception to the consumer range
 void setProducerExceptionRange()
          Assign the exception to the producer range
 void setProviderExceptionRange()
          Assign the exception to the provider range
 java.lang.String toHTMLString()
          Returns the Exception in the HTML string format.
 java.lang.String toString()
          Returns the exception as String
 
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

WSRPException

public WSRPException()

WSRPException

public WSRPException(int errorCode)
Creates a new common excpetion. The message to be passed will be ignored

Parameters:
errorCode - integer representing an error code

WSRPException

public WSRPException(int errorCode,
                     java.lang.Throwable t)
Creates a new common excpetion. The message to be passed will be ignored

Parameters:
errorCode - integer representing an error code
t - Throwable to be wrapped
Method Detail

getErrorCode

public int getErrorCode()
Returns an error code

Returns:
integer representing an error code

getNestedThrowable

public java.lang.Throwable getNestedThrowable()
Returns a nested Throwable

Returns:
Throwable if a nested Throwable exists or null

toString

public java.lang.String toString()
Returns the exception as String


toHTMLString

public java.lang.String toHTMLString()
Returns the Exception in the HTML string format. Nested exceptions are included in the report.


getExceptionRange

public int getExceptionRange()
Returns the range identifier of this exception. E.g. Common, Consumer, Producer or Provider range.

Returns:
the exception range id

setCommonExceptionRange

public void setCommonExceptionRange()
Assign the exception to the common range


setConsumerExceptionRange

public void setConsumerExceptionRange()
Assign the exception to the consumer range


setProducerExceptionRange

public void setProducerExceptionRange()
Assign the exception to the producer range


setProviderExceptionRange

public void setProviderExceptionRange()
Assign the exception to the provider range