[jsword-devel] Exception bubbling

Martin Denham mjdenham at gmail.com
Wed Mar 2 14:50:13 MST 2011


I tend to use RuntimeExceptions with web apps where there are clearly
defined entry points to catch all exceptions and inform the user.  I took a
slightly different approach when using JSword but found I still needed the
top level try/catch blocks that I used with RuntimeExceptions but also
needed the try/catch in the code for the sake of JSword's checked
exceptions.

Prof Martin Odersky would totally agree with you because in Scala all
exceptions are RuntimeExceptions.

The only problem I can see is it would not be easy to retain backward
compatibility so as not to break existing apps.

Regards
Martin



On 27 February 2011 10:41, Chris Burrell <chris at burrell.me.uk> wrote:

> Hi
>
> Can I assume that exception handling in JSword is all be done via a
> LucidException? It doesn't look like LucidRuntimeExceptions are being used
> much...
>
> I myself would prefer to be handling RuntimeException (i.e.
> LucidRuntimeException) as that would mean less explicit handling. For
> example, if I have someone ask for a verse that doesn't exist, my default
> behaviour will be to stop the processing, bubble up to the top and handle it
> there. I'd like to catch that exception as high up as possible without
> explicitly needing to specify it on every method that it might go through -
> clutters our code a little.
>
> Any thoughts?
>
> Cheers
> Chris
>
>
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110302/78829e2a/attachment.html>


More information about the jsword-devel mailing list