org.ceryle.util
Class ProcessException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.ceryle.util.ProcessException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DocumentException, GraphException, HelpException, ParseException, PlinkException, PluginException, ScriptException, SearchException, TopicMapException, VisualizationException, XMLParseException, XtmException

public class ProcessException
extends Exception

An general class for exceptions thrown during processing.

Since:
JDK1.3
Version:
$Id: ProcessException.java,v 3.5 2007-06-15 12:09:57 altheim Exp $
Author:
Murray Altheim
See Also:
Exception, Serialized Form

Field Summary
protected  Exception exception
          The embedded Exception if tunnelling.
protected  boolean isMessageId
          Indicates if message is a org.ceryle.util.MessageId string or actual message content.
protected  int line
          An int containing an optional line number parameter (-1 if unused).
protected  String messageId
          A String containing an optional first message parameter.
protected  String param1
          A String containing an optional first message parameter.
protected  String param2
          A String containing an optional second message parameter.
protected  String param3
          A String containing an optional third message parameter.
 
Constructor Summary
ProcessException(Exception exception)
          Constructor for ProcessException tunnelling the original Exception.
ProcessException(int line, String messageId)
          Constructor for ProcessException including location information.
ProcessException(int line, String messageId, String param1)
          Constructor for ProcessException with a MessageId and one parameter, including location information.
ProcessException(int line, String messageId, String param1, String param2)
          Constructor for ProcessException with a MessageId and two parameters, including location information.
ProcessException(String messageId)
          Constructor for ProcessException.
ProcessException(String messageId, Exception exception)
          Constructor for ProcessException provided a message identifier, tunnelling the original Exception.
ProcessException(String messageId, String param1)
          Constructor for ProcessException with a message ID and one parameter.
ProcessException(String messageId, String param1, String param2)
          Constructor for ProcessException with a message ID and two parameters.
ProcessException(String messageId, String param1, String param2, String param3)
          Constructor for ProcessException with a MessageId and three parameters.
 
Method Summary
 Exception getException()
          Returns the embedded exception, if any.
 int getLine()
          Returns the line number of the exception, -1 if it has not been set.
 String getMessage()
          Returns a description of the error.
 String getMessageId()
          If the message was expressed as a MessageId, return the original messageId string (e.g.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

isMessageId

protected boolean isMessageId
Indicates if message is a org.ceryle.util.MessageId string or actual message content.


messageId

protected String messageId
A String containing an optional first message parameter.


param1

protected String param1
A String containing an optional first message parameter.


param2

protected String param2
A String containing an optional second message parameter.


param3

protected String param3
A String containing an optional third message parameter.


line

protected int line
An int containing an optional line number parameter (-1 if unused).


exception

protected Exception exception
The embedded Exception if tunnelling.

Constructor Detail

ProcessException

public ProcessException(String messageId)
Constructor for ProcessException.

Parameters:
messageId - The unique message identifier.

ProcessException

public ProcessException(Exception exception)
Constructor for ProcessException tunnelling the original Exception.

Parameters:
exception - The original Exception.
See Also:
Utilities

ProcessException

public ProcessException(String messageId,
                        Exception exception)
Constructor for ProcessException provided a message identifier, tunnelling the original Exception.

Parameters:
messageId - The unique message identifier.
exception - The original Exception.
See Also:
Utilities

ProcessException

public ProcessException(String messageId,
                        String param1)
Constructor for ProcessException with a message ID and one parameter.

Parameters:
messageId - The unique message identifier.
param1 - A parameter string to be inserted at %1.
See Also:
Localizer

ProcessException

public ProcessException(String messageId,
                        String param1,
                        String param2)
Constructor for ProcessException with a message ID and two parameters.

Parameters:
messageId - The unique message identifier.
param1 - A parameter string to be inserted at %1.
param2 - A parameter string to be inserted at %2.
See Also:
Utilities

ProcessException

public ProcessException(String messageId,
                        String param1,
                        String param2,
                        String param3)
Constructor for ProcessException with a MessageId and three parameters.

Parameters:
messageId - The unique message identifier.
param1 - A parameter string to be inserted at %1.
param2 - A parameter string to be inserted at %2.
param3 - A parameter string to be inserted at %3.
See Also:
MessageId, Utilities

ProcessException

public ProcessException(int line,
                        String messageId)
Constructor for ProcessException including location information.

Parameters:
line - The line on which the error seems to have occurred.
messageId - The unique message identifier.
See Also:
MessageId, Utilities

ProcessException

public ProcessException(int line,
                        String messageId,
                        String param1)
Constructor for ProcessException with a MessageId and one parameter, including location information.

Parameters:
line - The line on which the error seems to have occurred.
messageId - The unique message identifier.
param1 - A parameter string to be inserted at %1.
See Also:
MessageId, Utilities

ProcessException

public ProcessException(int line,
                        String messageId,
                        String param1,
                        String param2)
Constructor for ProcessException with a MessageId and two parameters, including location information.

Parameters:
line - The line on which the error seems to have occurred.
messageId - The unique message identifier.
param1 - A parameter string to be inserted at %1.
param2 - A parameter string to be inserted at %2.
See Also:
MessageId, Utilities
Method Detail

getLine

public int getLine()
Returns the line number of the exception, -1 if it has not been set.

Returns:
The exception's line number as an int.

getException

public Exception getException()
Returns the embedded exception, if any.

Returns:
The embedded exception, or null.

getMessageId

public String getMessageId()
If the message was expressed as a MessageId, return the original messageId string (e.g. "M045"). If not, return null.

Returns:
The message identifier as a String.

getMessage

public String getMessage()
Returns a description of the error. If the message was expressed as a MessageId, provide the expanded text using the method Utilities.localize().

Overrides:
getMessage in class Throwable
Returns:
The message content as a String.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.