Hi,
I have written a parser in
java using SAXParser.
Also, schema validation is done. So when I give a incorrect xml it throws SAXException and I am able to catch the same. But on catching it I am conveting it to userDefined exception and throwing the same to client(java application), but on catching the same in client it is getting converted to null pointer exception and i have to put a catch( Exception ex) block to catch it, it is not getting catched in userdefined catch block.
code snippet
----------------------------
parser:
method parseInput (...) throws parseException
catch(SAXException sx)
{
throw new parseException( sx.getMessage());
}
client:
try
{
parseInput()
}
catch( parseException pe )
{
...
}
catch ( Exception e)
{
// Here it is getting caught.
System.out.println(" prints exception message as " + e.getMessage())) as NULL.
}
}
-- End -----------------------------------
Could some one throw pointers on the same.
Your help is highly appreciated and thanks for the same.