Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Shale Wiki" for change 
notification.

The following page has been changed by WendySmoak:
http://wiki.apache.org/shale/ExceptionHandling

The comment on the change is:
Another post from Craig :)

------------------------------------------------------------------------------
  
  You can change this by defining a class that implements 
org.apache.shale.view.!ExceptionHandler and storing it in application scope 
under the key defined by !FacesConstants.EXCEPTION_HANDLER (the literal value 
is "org$apache$shale$view$EXCEPTION_HANDLER").
  
- During a phase listener that is invokved after the Invoke Application phase 
(i.e. just after your command action has returned a logical outcome), it is 
checked whether there have been any exceptions accumulated by the default 
handler above.  
+ During a phase listener that is invoked after the Invoke Application phase 
(i.e. just after your command action has returned a logical outcome), it is 
checked whether there have been any exceptions accumulated by the default 
handler above.  
  
  If so, it can optionally do a !RequestDispatcher.forward() call to the 
context relative path of an error display page for your application.  You can 
configure such a path in web.xml with a context init parameter like this:
  
@@ -22, +22 @@

  In addition, it will receive request attributes containing interesting facts 
about the error that occurred, just like an error page you provide
  to your servlet  container as an exception handler.  The most interesting one 
is an attribute named  "javax.servlet.error.exception", which will receive a 
Shale !ApplicationException that  lists all the exceptions that have occurred 
for this request.
  
+ '''Can I turn off Shale's exception handling?'''
+ 
+ No. The exception handler is locked together with the view controller 
functionality for two reasons:
+ 
+ * Without it, Shale could not fulfill its contract to call destroy() if 
init() was ever called, when the application throws an exception.
+ 
+ * JSF implementations tend to eat exceptions anyway (for a similar sort of 
reason -- to guarantee that they can call the afterPhase() listeners if 
beforePhase() was called).
+ 
+ However, you can replace the default exception handler with one of your own.  
(See above.)
+ 
  === References ===
   * http://mail-archives.apache.org/mod_mbox/shale-user/200609.mbox/[EMAIL 
PROTECTED]
+  * http://www.nabble.com/How-to-turn-of-Shale-ExeptionHandling--t2371987.html
  

Reply via email to