[Simple-support] Request: accessible data fields in PersistenceException
Brought to you by:
niallg
|
From: Atkins, B. <Bri...@ne...> - 2011-01-05 21:12:19
|
I am using Simple for both serialization and as a configuration mechanism. I'd like to format user friendly messages when deserialization fails due to missing elements or attributes, or when values can't be parsed correctly (e.g. NumberFormatException). Would it be possible to put relevant data in accessible fields in PersistenceException? For deserialization, information such as enclosing element/class, the actual element or attribute that failed (perhaps already indicated by exception subtype and/or cause exception (e.g. FormatException w/ cause NumberFormatException) would be most helpful. Much of this data is already provided, but it is immediately formatted into the message text. If the same information could also be provided as fields accessible from the exception class, it would be much easier to customize handling of the exception. Any information on existing methods of getting this sort of information during deserialization would also be welcome. Thanks! Batkins |