i think it would be useful to be able to register a page for an exception
class. that way you can show specific error pages for specific errors you
have defined in your app, and because we would do an instanceof check when
iterating over registrations you can use the hierarchy of the exception
class to handle less-general exceptions easily. have a general page
registered for a runtimeexception, and a more specific one for
entitynotfoundexception. stuff like that.
this is of course given the fact that you need multiple error pages, if all
you want is a general error page this is kinda useless and what we provide
already suffices.
-igor
On 3/24/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:
* Eelco Hillenius:
> There's a couple of things I'm not crazy about.
>
> First of all, I'd much prefer just having factory method for
> exceptions, so that clients can choose themselves what are
> interesting exceptions and how to deal with that. That's way
> more flexible, as new cases wouldn't need new methods, and it
> would keep the interface minimal.
+1
> Another thing is that this would mean more ways to do the same
> thing. We already have RequestCycle#onRuntimeException, which
> IMO is a decent facility. I'd actually prefer it to be a bit
> more flexible to just return a request target or something, so
> that you can send an error code or redirect to a bookmarkable
> page (for the sake of ending up with a better url).
+1
Let's not start having one method for every type of exception.
Let the power to the users.
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/