Menu

#23 Maintain original exception upon posting xml

open
nobody
API (21)
5
2012-12-15
2012-01-10
No

As it is done right now when the message is posted:
public Element invoke(String methodName, Argument[] paras) throws RemoteException
{
...............
try
{
is = post(soapMsg);
SAXReader reader = new SAXReader();
Document doc = reader.read(is);
root = doc.getRootElement();
} catch (Exception e)
{
throw new RemoteException("VI SDK invoke exception:" + e);
}

Any kind of exception is wrapped into RemoteException and the exception is lost. It would be nice if instead of
throw new RemoteException("VI SDK invoke exception:" + e);
we could have
throw new RemoteException("VI SDK invoke exception:" + e, e);

So if need be the original exception is maintained.
This request came in to existence due to this situation (https://sourceforge.net/projects/vijava/forums/forum/826592/topic/4937834)

Discussion

MongoDB Logo MongoDB