[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jmx/src/main/org/jboss/mx/util DefaultExceptionHandler.java
From:       Juha Lindfors <juhalindfors () users ! sourceforge ! net>
Date:       2003-03-31 21:24:24
[Download RAW message or body]

  User: juhalindfors
  Date: 03/03/31 13:24:24

  Modified:    src/main/org/jboss/mx/util DefaultExceptionHandler.java
  Log:
  
  
  Revision  Changes    Path
  1.2       +32 -9     jmx/src/main/org/jboss/mx/util/DefaultExceptionHandler.java
  
  Index: DefaultExceptionHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/util/DefaultExceptionHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultExceptionHandler.java	21 Apr 2002 12:42:24 -0000	1.1
  +++ DefaultExceptionHandler.java	31 Mar 2003 21:24:23 -0000	1.2
  @@ -19,9 +19,10 @@
   import javax.management.RuntimeErrorException;
   
   /**
  + * Default exception handler for MBean proxy.
    *
    * @author  <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    */
   public class DefaultExceptionHandler
  @@ -33,22 +34,33 @@
      // must be rethrown as runtime exceptions to avoid UndeclaredThrowable
      // exceptions on the client
   
  -   public Object handleInstanceNotFound(ProxyContext ctx, \
InstanceNotFoundException e, Method m, Object[] args) throws Exception  +   public \
Object handleInstanceNotFound(ProxyContext ctx,  +                                    \
InstanceNotFoundException e,  +                                        Method m, \
Object[] args)  +                                        throws Exception
      {
         throw new RuntimeProxyException("Instance not found: " + e.toString());
      }
      
  -   public Object handleAttributeNotFound(ProxyContext ctx, \
AttributeNotFoundException e, Method m, Object[] args) throws Exception  +   public \
Object handleAttributeNotFound(ProxyContext ctx,  +                                   \
AttributeNotFoundException e,  +                                         Method m, \
Object[] args)  +                                         throws Exception
      {
         throw new RuntimeProxyException("Attribute not found: " + e.toString());
      }
      
  -   public Object handleInvalidAttributeValue(ProxyContext ctx, \
InvalidAttributeValueException e, Method m, Object[] args) throws Exception  +   \
public Object handleInvalidAttributeValue(ProxyContext ctx,  +                        \
InvalidAttributeValueException e,  +                                             \
Method m, Object[] args)  +                                             throws \
Exception  {
         throw new RuntimeProxyException("Invalid attribute value: " + e.toString());
      }
      
  -   public Object handleMBeanException(ProxyContext ctx, MBeanException e, Method \
m, Object[] args) throws Exception  +   public Object \
handleMBeanException(ProxyContext ctx, MBeanException e,  +                           \
Method m, Object[] args)  +                                      throws Exception
      {
         // assuming MBeanException only wraps mgmt interface "application" 
         // exceptions therefore we can safely rethrow the target exception
  @@ -56,7 +68,10 @@
         throw e.getTargetException();
      }
      
  -   public Object handleReflectionException(ProxyContext ctx, ReflectionException \
e, Method m, Object[] args) throws Exception  +   public Object \
handleReflectionException(ProxyContext ctx,  +                                        \
ReflectionException e,  +                                           Method m, \
Object[] args)  +                                           throws Exception
      {
         // use of reflection exception is inconsistent in the API so the 
         // safest bet is to rethrow a runtime exception
  @@ -68,19 +83,27 @@
            throw new RuntimeProxyException(target.toString());
      }
      
  -   public Object handleRuntimeOperationsException(ProxyContext ctx, \
RuntimeOperationsException e, Method m, Object[] args) throws Exception  +   public \
Object handleRuntimeOperationsException(ProxyContext ctx,  +                          \
RuntimeOperationsException e,  +                                                  \
Method m, Object[] args)  +                                                  throws \
Exception  {
         // target is always a runtime exception, so its ok to throw it from here
         throw e.getTargetException();
      }
      
  -   public Object handleRuntimeMBeanException(ProxyContext ctx, \
RuntimeMBeanException e, Method m, Object[] args) throws Exception  +   public Object \
handleRuntimeMBeanException(ProxyContext ctx,  +                                      \
RuntimeMBeanException e,  +                                             Method m, \
Object[] args)  +                                             throws Exception
      {
         // target is always a runtime exception, so its ok to throw it from here
         throw e.getTargetException();
      }
      
  -   public Object handleRuntimeError(ProxyContext ctx, RuntimeErrorException e, \
Method m, Object[] args) throws Exception  +   public Object \
handleRuntimeError(ProxyContext ctx, RuntimeErrorException e,  +                      \
Method m, Object[] args)  +                                    throws Exception
      {
         // just unwrap and throw the actual error
         throw e.getTargetError();
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic