Jeff Prickett wrote:
>
> Kevin,
>
> I have been following the discussion on exceptions in the Turbine list.
> From that discussion I have some thoughts on how we implement exceptions
> in jetspeed components, at this point mainly on how we should proceed
> with the iCalendar exception situation...
>
> I will wrap the getMessage() method with a getICalMsg() which throws an
> iCalendarException. We will basically catch and rethrow the exception in
> this case. I like this approach for a couple of reasons
>
> Pros
> 1. The most common exceptions we will find are the exceptions that I am
> throwing in the iCalendar code and truely are iCalendar exceptions.
>
> 2. A uniform exception signature for the iCalendar objects
>
> Cons
>
> 1. Catching and rethrowing an exception can throw someone who is debugging
> off the trail.
>
> 2. Added complexity... Need to define new method simply to change
> exception signature.
>
> In this case I think defining a new method in a single place is not too
> much work for the added consistency of a more uniform exception signature.
> If it meant more extensive changes, like what it seems to mean for Turbine
> than I would have to say stay with the 'throws Exception' clause.
>
> I have looked at the MessageResources code and seen where Jon had put a
> few validity checks in my original code. Thanks Jon!!!! These are minor
> problems which hopefully wont surface in the production/released code, but
> they are needed for completeness. If they were to surface in production
> code it would probably mean getting one of the programmers involved to fix
> the situation (ie this is not really a configuration/setup/user input
> issue).
<snip>
+1. We also need a JetspeedException which PortletException and
ICalendarException would extend. This an app could just catch
JetspeedException to become more generic.
...
We should also have a way to combine multiple project resources. I mean
so that we can have TurbineResources and JetspeedResources all via a
TurbineResource Service/Avalon block. This would have to be namespaced
though and would require some property rewrites. Then these would just
throw a ResourceException instead of just Exception.
--
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN: "Please Open Source Java!"
"For evil to win is for good men to do nothing."
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]