KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlet > exomvc > exception > DefaultExceptionHandler


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.portlet.exomvc.exception;
6
7 import javax.portlet.ActionRequest;
8 import javax.portlet.ActionResponse;
9 import javax.portlet.RenderRequest;
10 import javax.portlet.RenderResponse;
11 import org.exoplatform.portlet.exomvc.config.PageConfig;
12 import org.exoplatform.commons.utils.ExceptionUtil;
13 /**
14  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
15  * @since Nov 11, 2004
16  * @version $Id$
17  */

18 public class DefaultExceptionHandler implements ExceptionHandler {
19   
20   public boolean canHandle(Throwable JavaDoc t) { return true ; }
21   
22   public void handle(PageConfig config, Throwable JavaDoc t, ActionRequest req, ActionResponse res) {
23     t = ExceptionUtil.getRootCause(t) ;
24     String JavaDoc trace = ExceptionUtil.getExoStackTrace(t) ;
25     //System.out.println(trace) ;
26
}
27   
28   public void handle(PageConfig config, Throwable JavaDoc t, RenderRequest req, RenderResponse res) {
29     t = ExceptionUtil.getRootCause(t) ;
30     String JavaDoc trace = ExceptionUtil.getExoStackTrace(t) ;
31     //System.out.println(trace) ;
32
}
33 }
Popular Tags