Click to See Complete Forum and Search --> : Exception Catch Question


nili
06-09-2006, 05:52 PM
Hi guys,

Need some help

I have this java method:
public class TeamCenterRemoteExceptionHandler {

public static boolean handleException(Throwable t)
{
TcException ire = null;

if (t instanceof RemoteException)
{
ire = (TcException) t;
String s = ire.getErrorKey();

}



.....
.....

}

}

and i want to know how to call it here
try
{

....
....
....
....

}
catch TcException (ie)
{
TeamCenterRemoteExceptionHandler.handleException(ie);

}


Is that correct way to call it?(TeamCenterRemoteExceptionHandler.handleException(ie));

and the way you access TcException in the code:
TcException ire = null;

if (t instanceof RemoteException)
{
ire = (TcException) t;
String s = ire.getErrorKey();

}



thanks,
Nilima