Dear Castor Users,
I am marshalling my objects to XML using Castor. I would like any exceptions thrown by property getters in my classes during the marshalling to be propagated through Marshaller.marshall(). Is this possible? At the moment Castor silently ignores exceptions during marshalling.
From looking at the code, it does not seem straightforward. FieldHandlerImpl wraps the InvocationTargetException in an IllegalStateException which is simply ignored by Marshaller.marshall() i.e. try { } catch { continue; }
The only approach I can think of is to try to interpose my own FieldHandler around FieldHandlerImpl which wraps the InvocationTargetException in a RuntimeException.
Regards,
Niall
- [castor-user] Propagating exceptions during marshalling. Niall Smart
- Re: [castor-user] Propagating exceptions during marsh... Ralf Joachim
- Re: [castor-user] Propagating exceptions during m... Niall Smart
- Re: [castor-user] Propagating exceptions duri... Werner Guttmann

