Closed GoogleCodeExporter closed 9 years ago
This applies not just to the Work interface, but to every other standard
interface in Java (List, Runnable, etc). It's a shame that Google chose to use
a checked exception for this. Checked exceptions are the worst part of Java.
There's no way to add "throws ServiceException" to Work without irritating
every other Objectify user (including me). However, there is a workaround. You
will need to wrap and unwrap the exception across the Work.run() boundary using
a runtime exception. Create your own implementation of transact() which
declares 'throws ServiceException' and takes a YourWork interface (which also
declares the exception). You can call Objectify's transact() with an
implementation that wraps and unwraps any ServiceExceptions that are thrown.
I'm closing this issue since it's not a bug; if you would like further help
please post to the Google Group.
Original comment by lhori...@gmail.com
on 27 Aug 2014 at 6:12
Original issue reported on code.google.com by
casinit...@gmail.com
on 16 Aug 2014 at 4:11