Hi all,

I tried out the following code but it did not work.

try
{
 ...
}
catch(Exception e)
       {
      Throwable cause = e.getCause();
       System.out.println(e.getCause());
       }

Can anyone help.

Thanks,
Vikas.
-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@;mpi.com]
Sent: Monday, October 21, 2002 11:17 AM
To: Tomcat Users List
Subject: [OFF-TOPIC] - RE: How to capture the ROOT cause of EXCEPTION


Hi,
Did you try:

try
{
  ... do something...
}
catch(Exception e)
{
  Throwable cause = e.getCause();
  ... do whatever you want with the cause ...
}

By the way, as this is not a tomcat question, please either post
somewhere appropriate (comp.lang.java.help for example), or at least add
OFF-TOPIC to your subject.  Thanks,

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Nagpal, Vikas [mailto:vinagpal@;utmb.edu]
>Sent: Monday, October 21, 2002 12:12 PM
>To: '[EMAIL PROTECTED]'
>Subject: How to capture the ROOT cause of EXCEPTION
>
>Hello EveryBody,
>
>I have been trying to catch the ROOT cause of the exception. I am able
to
>get the NULL for the number which caused this exception but not the
NUMBER.
>Can anyone tell how to PRINT the NUMBER which caused the EXCEPTION. I
want
>to subsitute the NULL with the NUMBER.
>
>Thanks,
>With regards,
>Vikas nagpal.
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to