Dor-Shifer Amit wrote:
Hi,
Though in the API I can't seem to see that a/m method throws any
exceptions, I see that a lot of test programs in xerces-c's sourse tree
do wrap the call in try/catch. Why is that?
Apart from the exceptions mentioned in the API, should a using program
catch any other exceptions? What about OutOfMemoryException?
If you use the default MemoryManager implementation, you could get an
OutOfMemoryException. Also, I suspect there are places in the code
where initialization could throw exceptions, especially if you specify
the parameter that initializes all statics.
Note that you can install a PanicHandler if you want control over how
your application reacts to error conditions during initialization that
are so fundamental that exceptions can't be thrown. The default
PanicHandler behavior is to call exit().
Dave