On 10/19/07, Felix Meschberger <[EMAIL PROTECTED]> wrote:

> ...Many methods in microsling are defined to throw Exception....

That's me ;-)

I know many people find this wrong (do you have more info/references
on why?) but I like to do that in widely-used interfaces, as it allows
the implementation to throw any suitable exception, without having to
run through hoops to rethrow the "correct" one.

Then, at the highest level where this makes sense, you catch
Exceptions and their subclasses in a fine-grained way, as needed. But
that's (IMHO) a high-level concern, not something that should happen
all over the place.

> ...I would suggest, that all
> methods allowed to throw checked exceptions should throw SlingException....

The downside is having to rethrow exceptions which the implementation
gets and which are not SlingExceptions.

What's the upside, in your opinion?

(I'm not being ironic, it's really a question that no one answered in
a satisfactory way for my pragmatic brain until now)

-Bertrand

Reply via email to