Any way we could override printStackTrace() to show the target 
throwables trace?  Might want to look/copy the bits in 
org.jboss.util.NestedThrowable.

--jason


Juha Lindfors wrote:

>  User: juhalindfors
>  Date: 02/03/08 03:49:18
>
>  Modified:    src/main/javax/management JMException.java
>                        ReflectionException.java
>  Log:
>  nice exceptions give their rootcause in toString()
>  
>  Revision  Changes    Path
>  1.3       +1 -0      jmx/src/main/javax/management/JMException.java
>  
>  Index: JMException.java
>  ===================================================================
>  RCS file: /cvsroot/jboss/jmx/src/main/javax/management/JMException.java,v
>  retrieving revision 1.2
>  retrieving revision 1.3
>  diff -u -r1.2 -r1.3
>  --- JMException.java 15 Dec 2001 17:00:56 -0000      1.2
>  +++ JMException.java 8 Mar 2002 11:49:17 -0000       1.3
>  @@ -13,8 +13,9 @@
>    *
>    * @see javax.management.JMRuntimeException
>    *
>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
>    * @author <a href="mailto:[EMAIL PROTECTED]";>Adrian Brock</a>
>  - * @version $Revision: 1.2 $
>  + * @version $Revision: 1.3 $
>    */
>   public class JMException
>      extends Exception
>  
>  
>  
>  1.3       +6 -2      jmx/src/main/javax/management/ReflectionException.java
>  
>  Index: ReflectionException.java
>  ===================================================================
>  RCS file: /cvsroot/jboss/jmx/src/main/javax/management/ReflectionException.java,v
>  retrieving revision 1.2
>  retrieving revision 1.3
>  diff -u -r1.2 -r1.3
>  --- ReflectionException.java 15 Dec 2001 19:40:52 -0000      1.2
>  +++ ReflectionException.java 8 Mar 2002 11:49:17 -0000       1.3
>  @@ -10,8 +10,9 @@
>    * Thrown by the MBeanServer when an exception occurs using the
>    * java.lang.reflect package to invoke methods on MBeans.
>    *
>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
>    * @author <a href="mailto:[EMAIL PROTECTED]";>Adrian Brock</a>
>  - * @version $Revision: 1.2 $
>  + * @version $Revision: 1.3 $
>    */
>   public class ReflectionException
>      extends JMException
>  @@ -63,7 +64,10 @@
>      }
>   
>      // JMException overrides -----------------------------------------
>  -
>  -   // Private -------------------------------------------------------
>  +   public String toString()
>  +   {
>  +      return "ReflectionException: " + getMessage() + ((e == null) ? "" : 
>"\nCause: " + e.toString());
>  +   }
>  +   
>   }
>   
>  
>  
>  
>
>_______________________________________________
>Jboss-development mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-development
>



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to