Closed GoogleCodeExporter closed 9 years ago
Throwing Exception from this interface would force every caller to catch
Exception (or declare it), making the interface cumbersome to use.
InvocationTargetException is no better. You get all the pain of checked
exceptions with none of the type safety; this is the reason checked exceptions
have been abandoned by pretty much every language designed since Java. Checked
exceptions are incompatible with the idea of standard interfaces.
You may choose to wrap ObjectifyImpl.transact() with your own method that
throws Exception; you can use your own unchecked wrapper exception to convey
the original exception across the Work boundary. But I don't recommend it.
Original comment by lhori...@gmail.com
on 23 Dec 2013 at 10:43
Original issue reported on code.google.com by
simplex....@gmail.com
on 19 Dec 2013 at 10:53