org.jboss.naming.interceptors
public class: ExceptionInterceptor [javadoc |
source]
java.lang.Object
org.jboss.proxy.Interceptor
org.jboss.naming.interceptors.ExceptionInterceptor
All Implemented Interfaces:
Externalizable
A client interceptor that handles the wrapping of exceptions to
NamingExceptions
- author:
Scott.Stark - @jboss.org
- version:
$ - Revision: 37459 $
| Method from org.jboss.naming.interceptors.ExceptionInterceptor Summary: |
|---|
|
invoke |
| Method from org.jboss.naming.interceptors.ExceptionInterceptor Detail: |
public Object invoke(Invocation mi) throws Throwable {
Object value = null;
try
{
value = getNext().invoke(mi);
}
catch(NamingException e)
{
throw e;
}
catch(IOException e)
{
CommunicationException ce = new CommunicationException("Operation failed");
ce.setRootCause(e);
throw ce;
}
catch(Throwable t)
{
ServiceUnavailableException sue = new ServiceUnavailableException("Unexpected failure");
sue.setRootCause(t);
throw sue;
}
return value;
}
Handle methods locally on the client |