badpenguin.dkim
Class DkimException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by badpenguin.dkim.DkimException
All Implemented Interfaces:
java.io.Serializable

public class DkimException
extends java.lang.Exception

This is a class of exceptions which are thrown by the JavaDKIM library when things go wrong. These Exceptions always include a DkimError, which includes a short status string, an ErrorType (NOSIG, PASS, PERMFAIL, TEMPFAIL, or LIBERROR), and a description.
You will probably want to decide what to do with the exception based on the ErrorType.

Author:
Mark Boddington <dk_NO_im@_SP_bad_AM_penguin.co.uk>
http://www.badpenguin.co.uk
See Also:
Serialized Form

Constructor Summary
DkimException(DkimError arg0)
          Create a DKIM Exception by specifying only the DkimError.
DkimException(DkimError arg0, java.lang.String arg1)
          Create a DKIM Exception by specifying the DkimError type and a descriptive message of the problem.
DkimException(DkimError arg0, java.lang.String arg1, java.lang.Throwable e)
          Create a DKIM Exception by specifying the DkimError type, a descriptive message of the problem, and a Throwable cause.
DkimException(DkimError arg0, java.lang.Throwable e)
          Create a DKIM Exception by specifying the DkimError type and a Throwable cause.
 
Method Summary
 java.lang.Throwable getCause()
          Return the root cause of this Exception, if there was one.
 DkimError getError()
          Get the DkimError type for this exception.
 ErrorType getErrorType()
          Return the ErrorType of this Exception
 java.lang.String getMessage()
          Return the error description provided when this exception was thrown, or the default description from DkimError.getDescription(), if no description was specified.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DkimException

public DkimException(DkimError arg0)
Create a DKIM Exception by specifying only the DkimError. The description of the DkimError will be returned to calls to getMessage()

Parameters:
arg0 - - DkimError

DkimException

public DkimException(DkimError arg0,
                     java.lang.String arg1)
Create a DKIM Exception by specifying the DkimError type and a descriptive message of the problem.

Parameters:
arg0 - - DkimError
arg1 - - Description of the error

DkimException

public DkimException(DkimError arg0,
                     java.lang.Throwable e)
Create a DKIM Exception by specifying the DkimError type and a Throwable cause. This should be used when the code itself caught an Exception.

Parameters:
arg0 - - DkimError
e - - Throwable cause

DkimException

public DkimException(DkimError arg0,
                     java.lang.String arg1,
                     java.lang.Throwable e)
Create a DKIM Exception by specifying the DkimError type, a descriptive message of the problem, and a Throwable cause. This should be used when the code itself caught an Exception.

Parameters:
arg0 - - DkimError
arg1 - - Description of the error
e - - Throwable cause
Method Detail

getMessage

public java.lang.String getMessage()
Return the error description provided when this exception was thrown, or the default description from DkimError.getDescription(), if no description was specified.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The error message

getCause

public java.lang.Throwable getCause()
Return the root cause of this Exception, if there was one.

Overrides:
getCause in class java.lang.Throwable
Returns:
Throwable cause

getError

public DkimError getError()
Get the DkimError type for this exception.

Returns:
- Dkim Error

getErrorType

public ErrorType getErrorType()
Return the ErrorType of this Exception

Returns:
ErrorType


© Copyright 2009 Mark Boddington (www.badpenguin.co.uk)