org.purl.sword.base
Class SWORDException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.purl.sword.base.SWORDException
All Implemented Interfaces:
Serializable

public class SWORDException
extends Exception

Represents a generic SWORD exception. If this thrown by a repository, it would result in a HTTP 500 message being returned to the user.

Author:
Stuart Lewis, Neil Taylor
See Also:
Serialized Form

Constructor Summary
SWORDException(String message)
          Create a new instance and store the specified message.
SWORDException(String message, Exception source)
          Create a new instance and store the specified message and source data.
SWORDException(String message, Exception source, String errorCode)
          Create a new instance and store the specified message and source data.
 
Method Summary
 String getErrorCode()
          Get the error code
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SWORDException

public SWORDException(String message,
                      Exception source)
Create a new instance and store the specified message and source data.

Parameters:
message - The message for the exception.
source - The original exception that lead to this exception. This can be null.

SWORDException

public SWORDException(String message,
                      Exception source,
                      String errorCode)
Create a new instance and store the specified message and source data.

Parameters:
message - The message for the exception.
source - The original exception that lead to this exception. This can be null.
errorCode - The error code to sed back with the request

SWORDException

public SWORDException(String message)
Create a new instance and store the specified message.

Parameters:
message - The message for the exception.
Method Detail

getErrorCode

public String getErrorCode()
Get the error code

Returns:
The error code


Copyright © 2009 The DSpace Foundation. All Rights Reserved.