Code example for UndeclaredThrowableException

0
            MarshalledValue mv = new MarshalledValue(t); 
            Throwable t2 = (Throwable) mv.get(); 
            if( t2 instanceof Exception ) 
               throw (Exception) t2; 
            else 
               throw new UndeclaredThrowableException(t2); 
         } 
      } 
      else 
      { 
         // Go through the transport invoker 
         Invoker invoker = invocation.getInvocationContext().getInvoker(); 
         rtnValue = invoker.invoke(invocation); 
      } 
      return rtnValue; 
   } 
}