org.objectweb.carol.rmi.exception
Class NoSuchObjectExceptionHelper

java.lang.Object
  extended byorg.objectweb.carol.rmi.exception.NoSuchObjectExceptionHelper

public class NoSuchObjectExceptionHelper
extends java.lang.Object

This class throws NoSuchObjectException by using provided exception, and set the detail attribute of the newly created exception. This avoid to forget initial exception.
initCause() cannot be used as it is a RemoteException.
Use detail attribute as suggested by Vadim Nasardinov

Author:
Florent Benoit (

Method Summary
static java.rmi.NoSuchObjectException create(java.lang.String message, java.lang.Exception originalException)
          Build a new exception with the given exception by wrapping it in a NoSuchObjectException
static java.rmi.NoSuchObjectException create(java.lang.String message, java.lang.Throwable originalThrowable)
          Build a new exception with the given Throwable by wrapping it in a NoSuchObjectException
static java.rmi.NoSuchObjectException create(java.lang.Throwable originalThrowable)
          Build a new exception with the given Throwable by wrapping it in a NoSuchObjectException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static java.rmi.NoSuchObjectException create(java.lang.String message,
                                                    java.lang.Exception originalException)
Build a new exception with the given exception by wrapping it in a NoSuchObjectException

Parameters:
message - text error for the exception
originalException - original exception
Returns:
built exception

create

public static java.rmi.NoSuchObjectException create(java.lang.Throwable originalThrowable)
Build a new exception with the given Throwable by wrapping it in a NoSuchObjectException

Parameters:
originalThrowable - original throwable
Returns:
built exception

create

public static java.rmi.NoSuchObjectException create(java.lang.String message,
                                                    java.lang.Throwable originalThrowable)
Build a new exception with the given Throwable by wrapping it in a NoSuchObjectException

Parameters:
message - text error for the exception
originalThrowable - original throwable
Returns:
built exception