org.eclipse.webdav.internal.kernel
Class DAVRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.webdav.internal.kernel.DAVRuntimeException
All Implemented Interfaces:
Serializable

public class DAVRuntimeException
extends RuntimeException

See Also:
Serialized Form

Constructor Summary
DAVRuntimeException(int code, String message)
          Create and answer a new runtime exception with the specified error code and descriptive message.
DAVRuntimeException(String message)
          Create and answer a new runtime exception with the given descriptive message.
DAVRuntimeException(Throwable exception)
          Create and answer a runtime exception which wraps the given exception.
DAVRuntimeException(Throwable exception, String message)
          Makes the same association between exception argument and error code as DAVRuntimeException(Exception)
 
Method Summary
 int getErrorCode()
          Answer the error code which is set on the receiver.
 Throwable getWrappedException()
          Answer the receiver's field which holds onto the exception which the receiver wraps.
 void printStackTrace()
          If the receiver wraps an exception, then ask the exception to print out a stack trace to the system output.
protected  void setErrorCode(int errorCode)
          Set the receiver's field which holds onto the error code.
protected  void setWrappedException(Throwable exception)
          Set the receiver's field which holds onto the wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DAVRuntimeException

public DAVRuntimeException(int code,
                           String message)
Create and answer a new runtime exception with the specified error code and descriptive message.

Parameters:
code - the error code for the exception
message - a string describing the exception

DAVRuntimeException

public DAVRuntimeException(String message)
Create and answer a new runtime exception with the given descriptive message.

Parameters:
message - a string describing the exception

DAVRuntimeException

public DAVRuntimeException(Throwable exception)
Create and answer a runtime exception which wraps the given exception.


DAVRuntimeException

public DAVRuntimeException(Throwable exception,
                           String message)
Makes the same association between exception argument and error code as DAVRuntimeException(Exception)

Parameters:
exception - the exception to wrap
message - a string describing the exception
Method Detail

getErrorCode

public int getErrorCode()
Answer the error code which is set on the receiver. If the receiver wraps a DAV4JException, then get the error code from the wrapped exception.


getWrappedException

public Throwable getWrappedException()
Answer the receiver's field which holds onto the exception which the receiver wraps.

Returns:
the wrapped exception

printStackTrace

public void printStackTrace()
If the receiver wraps an exception, then ask the exception to print out a stack trace to the system output.

Overrides:
printStackTrace in class Throwable

setErrorCode

protected void setErrorCode(int errorCode)
Set the receiver's field which holds onto the error code.

Parameters:
errorCode - the error code for the exception

setWrappedException

protected void setWrappedException(Throwable exception)
Set the receiver's field which holds onto the wrapped exception.

Parameters:
exception - the exception to be wrapped


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.