org.aitools.programd.processor
Class ProcessorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.aitools.programd.processor.ProcessorException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InvalidStartupElementException

public class ProcessorException
extends java.lang.Exception

Should be thrown by processors when they find content that they cannot handle.

Since:
4.1.3
Author:
Noel Bush
See Also:
Serialized Form

Field Summary
private  java.lang.String offendingInput
           
 
Constructor Summary
ProcessorException(java.lang.String message, java.lang.Throwable exception)
           
ProcessorException(java.lang.String message, java.lang.Throwable exception, java.lang.String input)
           
 
Method Summary
 java.lang.String getExplanatoryMessage()
          If an offendingInput has been specified, this message will be the ProcessorException's regular message, plus the string " due to: " followed by the offending input.
 java.lang.String getOffendingInput()
           
 boolean hasOffendingInput()
           
 
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
 

Field Detail

offendingInput

private java.lang.String offendingInput
Constructor Detail

ProcessorException

public ProcessorException(java.lang.String message,
                          java.lang.Throwable exception)
Parameters:
message - the message describing the error
exception - the exception that generated the error

ProcessorException

public ProcessorException(java.lang.String message,
                          java.lang.Throwable exception,
                          java.lang.String input)
Parameters:
message - the message describing the error
exception - the exception that generated the error
input - the offending input
Method Detail

getOffendingInput

public java.lang.String getOffendingInput()
Returns:
the offending input, if available, that generated this exception

hasOffendingInput

public boolean hasOffendingInput()
Returns:
whether this exception contains an offending input

getExplanatoryMessage

public java.lang.String getExplanatoryMessage()
If an offendingInput has been specified, this message will be the ProcessorException's regular message, plus the string " due to: " followed by the offending input.

Returns:
a message including the offending input, if available