discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

add custom exception handlers to serialization #172

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
this is not a bug, but a feature request:

it would be great to have the option to supply a custom exception handler, so 
that we could, for 
instance, continue serializing an object instead of throwing one exception that 
kills the entire 
process.

in the source, it would go something like while serializing a field, catch any 
exception and call a 
handler which can optionally rethrow or swallow it and return a JsonElement, 
thus allowing 
serialization to continue... bla, bla, etc., etc.

namely this was failing with Hibernate lazy init properties... i just want it 
to log for debug, and if 
lazy-init is failing, i don't care.

Original issue reported on code.google.com by johnmarn...@gmail.com on 5 Nov 2009 at 7:56

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 7 Oct 2010 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by inder123 on 3 Nov 2010 at 1:47

GoogleCodeExporter commented 9 years ago
Marking won't fix. Ping if you think this is an error.

Original comment by limpbizkit on 11 Feb 2012 at 6:41