org.eclipse.webdav.internal.kernel
Class DAV4JRuntimeException

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.DAV4JRuntimeException
All Implemented Interfaces:
Serializable

public class DAV4JRuntimeException
extends RuntimeException

See Also:
Serialized Form

Constructor Summary
DAV4JRuntimeException(int code, String message)
          Create and answer a new runtime exception with the specified error code and descriptive message.
DAV4JRuntimeException(String message)
          Create and answer a new runtime exception with the given descriptive message.
DAV4JRuntimeException(Throwable exception)
          Create and answer a runtime exception which wraps the given exception.
DAV4JRuntimeException(Throwable exception, String message)
          Makes the same association between exception argument and error code as DAV4JRuntimeException(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

DAV4JRuntimeException

public DAV4JRuntimeException(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

DAV4JRuntimeException

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

Parameters:
message - a string describing the exception

DAV4JRuntimeException

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


DAV4JRuntimeException

public DAV4JRuntimeException(Throwable exception,
                             String message)
Makes the same association between exception argument and error code as DAV4JRuntimeException(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.