On Fri, Nov 20, 2009 at 1:59 PM, Lex Spoon <[email protected]> wrote: > That looks like an accident. It looks like the intent was never to > serialize an unchecked exception. > > When John and I talked about this issue previously, we couldn't come > up with an example where you'd really need to serialize an unchecked > exception. You could always either make it checked, or throw a > different exception instead of the unchecked one. >
If you are using library code, you may not have freedom to change the exception type. Sure, you could declare your own and wrap it, but that seems awkward. > Are there any use cases for serializing an unchecked exception, or > could we instead have STOB skip RunTimeExceptions just like it skips > Errors? > It seems telling someone to simply add a throws to get the RTE serialized is an easier workaround than telling them to change the hierarchy of the exception and then add checked throws everywhere that method might be called, which might include library code you can't change. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
