qflib 0.98.1

de.qfs.lib.command
Class RuntimeCommandException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--de.qfs.lib.command.RuntimeCommandException
All Implemented Interfaces:
java.io.Serializable

public class RuntimeCommandException
extends java.lang.RuntimeException

A RuntimeCommandException is useful to pass RuntimeExceptions that were expected and can be handled up to the CommandDistributor, without having to declare it.

Otherwise the RuntimeCommandException has the same semantic as a MessageCommandException except for an additional nested exception that is the original source of the error.

Since:
0.98.0
Version:
$Revision: 1.3 $
Author:
Gregor Schmid
See Also:
Serialized Form

Constructor Summary
RuntimeCommandException(java.lang.Exception nested)
          Create a new RuntimeCommandException.
RuntimeCommandException(java.lang.Exception nested, java.lang.String message)
          Create a new RuntimeCommandException.
RuntimeCommandException(java.lang.Exception nested, java.lang.String message, java.lang.Object parent, java.lang.String messageResource)
          Create a new RuntimeCommandException.
RuntimeCommandException(java.lang.Exception nested, java.lang.String message, java.lang.Object parent, java.lang.String messageResource, java.lang.Object[] parameters)
          Create a new RuntimeCommandException.
 
Method Summary
 java.lang.Object[] getMessageParameters()
          Get the messageParameters of the RuntimeCommandException.
 java.lang.String getMessageResource()
          Get the messageResource of the RuntimeCommandException.
 java.lang.Exception getNested()
          Get the original reason for the exception.
 java.lang.Object getParent()
          Get the parent of the RuntimeCommandException.
 void setMessageParameters(java.lang.Object[] messageParameters)
          Set the messageParameters for the RuntimeCommandException.
 void setMessageResource(java.lang.String messageResource)
          Set the messageResource for the RuntimeCommandException.
 void setParent(java.lang.Object parent)
          Set the target component for the message display.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuntimeCommandException

public RuntimeCommandException(java.lang.Exception nested)
Create a new RuntimeCommandException.
Parameters:
nested - The original source of the error.

RuntimeCommandException

public RuntimeCommandException(java.lang.Exception nested,
                               java.lang.String message)
Create a new RuntimeCommandException.
Parameters:
nested - The original source of the error.
message - A message detailing the reason for the exception.

RuntimeCommandException

public RuntimeCommandException(java.lang.Exception nested,
                               java.lang.String message,
                               java.lang.Object parent,
                               java.lang.String messageResource)
Create a new RuntimeCommandException.
Parameters:
nested - The original source of the error.
message - A message detailing the reason for the exception.
parent - The parent Component for the dialog to display.
messageResource - The resource basename for the message dialog.
See Also:
Message.showMessage(Component,String,Object[])

RuntimeCommandException

public RuntimeCommandException(java.lang.Exception nested,
                               java.lang.String message,
                               java.lang.Object parent,
                               java.lang.String messageResource,
                               java.lang.Object[] parameters)
Create a new RuntimeCommandException.
Parameters:
nested - The original source of the error.
message - A message detailing the reason for the exception.
parent - The parent Component for the dialog to display.
messageResource - The resource basename for the message dialog.
parameters - The parameters for the message.
See Also:
Message.showMessage(Component,String,Object[])
Method Detail

getNested

public java.lang.Exception getNested()
Get the original reason for the exception.
Returns:
The nested Exception.

getParent

public final java.lang.Object getParent()
Get the parent of the RuntimeCommandException.
Returns:
The parent of the RuntimeCommandException.

setParent

public void setParent(java.lang.Object parent)
Set the target component for the message display. This is useful since that way a nested library method doesn't have to know about the GUI context from which it was called.
Parameters:
parent - The new parent to set.

getMessageResource

public final java.lang.String getMessageResource()
Get the messageResource of the RuntimeCommandException.
Returns:
The messageResource of the RuntimeCommandException.

setMessageResource

public void setMessageResource(java.lang.String messageResource)
Set the messageResource for the RuntimeCommandException. The original caller of the method that caused the Exception may have additional information that makes this necessary.
Parameters:
messageResource - The new messageResource.

getMessageParameters

public final java.lang.Object[] getMessageParameters()
Get the messageParameters of the RuntimeCommandException.
Returns:
The messageParameters of the RuntimeCommandException.

setMessageParameters

public void setMessageParameters(java.lang.Object[] messageParameters)
Set the messageParameters for the RuntimeCommandException. The original caller of the method that caused the Exception may have additional information that makes this necessary.
Parameters:
messageParameters - The new messageParameters.

qflib 0.98.1