SmartFrog 3.10.000

org.smartfrog.sfcore.common
Class SmartFrogRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.smartfrog.sfcore.common.SmartFrogException
              extended by org.smartfrog.sfcore.common.SmartFrogRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SmartFrogContextException, SmartFrogDeploymentException, SmartFrogLifecycleException, SmartFrogLivenessException, SmartFrogResolutionException

public class SmartFrogRuntimeException
extends SmartFrogException
implements java.io.Serializable

A SmartFrogRuntimeException is thrown when an irrecoverable error occurs while running a SmartFrog component.

See Also:
Serialized Form

Field Summary
static java.lang.String REFERENCE
          Attribute name for reference in exceptioncontext.
static java.lang.String SOURCE
          Attribute name in exceptioncontext: The source of the exception.
 
Fields inherited from class org.smartfrog.sfcore.common.SmartFrogException
CONTEXT, cxt, DATA, EXCEPTION, PRIM_COMPLETE_NAME, PRIM_CONTEXT
 
Constructor Summary
SmartFrogRuntimeException(java.lang.String message)
          Constructs a SmartFrogRuntimeException with message.
SmartFrogRuntimeException(java.lang.String message, Prim sfObject)
          Constructs a SmartFrogRuntimeException with message.
SmartFrogRuntimeException(java.lang.String message, java.lang.Throwable cause)
          Constructs a SmartFrogRuntimeException with message and cause.
SmartFrogRuntimeException(java.lang.String message, java.lang.Throwable cause, Prim sfObject)
          Constructs a SmartFrogRuntimeException with message and cause.
SmartFrogRuntimeException(java.lang.Throwable cause)
          Constructs a SmartFrogRuntimeException with cause.
SmartFrogRuntimeException(java.lang.Throwable cause, Prim sfObject)
          Constructs a SmartFrogRuntimeException with cause.
 
Method Summary
static SmartFrogException forward(java.lang.String message, java.lang.Throwable thr)
          To forward SmartFrog exceptions instead of chain them.
static SmartFrogException forward(java.lang.Throwable thr)
          To forward SmartFrog exceptions instead of chain them.
 void init(Prim sfObject)
          Initializes the exception context with the SmartFrog component.
 java.lang.String toString(java.lang.String nm)
          Returns a string representation of the runtime exception.
 
Methods inherited from class org.smartfrog.sfcore.common.SmartFrogException
add, contains, containsKey, get, getCauseMessage, getContext, put, put, serializableContext, setContext, shortClassName, toString, toStringAll, toStringAll
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REFERENCE

public static final java.lang.String REFERENCE
Attribute name for reference in exceptioncontext.

See Also:
Constant Field Values

SOURCE

public static final java.lang.String SOURCE
Attribute name in exceptioncontext: The source of the exception.

See Also:
Constant Field Values
Constructor Detail

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.String message)
Constructs a SmartFrogRuntimeException with message.

Parameters:
message - exception message

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.Throwable cause)
Constructs a SmartFrogRuntimeException with cause.

Parameters:
cause - exception causing this exception

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.Throwable cause,
                                 Prim sfObject)
Constructs a SmartFrogRuntimeException with cause. Also initializes the exception context with component details.

Parameters:
cause - exception causing this exception
sfObject - component that encountered exception

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.String message,
                                 java.lang.Throwable cause)
Constructs a SmartFrogRuntimeException with message and cause.

Parameters:
message - exception message
cause - exception causing this exception

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.String message,
                                 Prim sfObject)
Constructs a SmartFrogRuntimeException with message. Also initializes the exception context with component details.

Parameters:
message - message
sfObject - component that encountered exception

SmartFrogRuntimeException

public SmartFrogRuntimeException(java.lang.String message,
                                 java.lang.Throwable cause,
                                 Prim sfObject)
Constructs a SmartFrogRuntimeException with message and cause. Also initializes the exception context with component details.

Parameters:
message - message
cause - exception causing this exception
sfObject - component that encountered exception
Method Detail

init

public void init(Prim sfObject)
Initializes the exception context with the SmartFrog component.

Overrides:
init in class SmartFrogException
Parameters:
sfObject - component that encountered exception

forward

public static SmartFrogException forward(java.lang.Throwable thr)
To forward SmartFrog exceptions instead of chain them.

Parameters:
thr - throwable object to be forwarded
Returns:
SmartFrogException that is a SmartFrogRuntimeException

forward

public static SmartFrogException forward(java.lang.String message,
                                         java.lang.Throwable thr)
To forward SmartFrog exceptions instead of chain them. If thr is an instance of SmartFrogRuntimeException then the exception is returned without any modification, if not a new SmartFrogRuntimeException is created with message as a paramenter

Parameters:
message - message
thr - throwable object to be forwarded
Returns:
Throwable that is a SmartFrogRuntimeException

toString

public java.lang.String toString(java.lang.String nm)
Returns a string representation of the runtime exception.

Overrides:
toString in class SmartFrogException
Parameters:
nm - Message separator (ex. "\n");
Returns:
reason source and ref of exception

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP