jACOB 2.7 API Documentation.

de.tif.jacob.core.exception
Class ExceptionHandler

java.lang.Object
  extended by de.tif.jacob.core.exception.ExceptionHandler

public final class ExceptionHandler
extends java.lang.Object

Exception handler class which should be used to report caught throwables in a well-defined way.


Field Summary
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
 
Constructor Summary
ExceptionHandler()
           
 
Method Summary
static java.lang.String getExtendedStackTrace(java.lang.Throwable th)
          Creates an extended stack trace out of the given throwable.
static void handle(IClientContext context, java.lang.Throwable th)
          Reports the caught throwable in the internal database and shows the current user an error dialog.
static java.lang.String handle(java.lang.Throwable th)
          Reports the caught throwable in the internal database.
static void handleNoReport(IClientContext context, java.lang.Throwable th)
          Shows the current user an error dialog.
static void handleSmart(IClientContext context, java.lang.Throwable th)
          Handles the caught throwable in a smart way, i.e. depending on the type of the throwable an error is reported or an information message is shown to the current user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final transient java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

public static final transient java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values
Constructor Detail

ExceptionHandler

public ExceptionHandler()
Method Detail

handle

public static void handle(IClientContext context,
                          java.lang.Throwable th)
Reports the caught throwable in the internal database and shows the current user an error dialog.

Parameters:
context - the current session context
th - The throwable to reported

handleNoReport

public static void handleNoReport(IClientContext context,
                                  java.lang.Throwable th)
Shows the current user an error dialog.

Parameters:
context - the current session context
th - The throwable to reported

handleSmart

public static void handleSmart(IClientContext context,
                               java.lang.Throwable th)
Handles the caught throwable in a smart way, i.e. depending on the type of the throwable an error is reported or an information message is shown to the current user.

Parameters:
context - the current session context
th - The throwable to reported

handle

public static java.lang.String handle(java.lang.Throwable th)
Reports the caught throwable in the internal database. There is no feedback to the user.

Parameters:
th - The throwable to reported

getExtendedStackTrace

public static java.lang.String getExtendedStackTrace(java.lang.Throwable th)
Creates an extended stack trace out of the given throwable. The extended stack trace contains revision information concerning the involved classes as far as possible.

Example extended stack trace:

 
  at de.tif.jacob.util.FastStringWriter.write(FastStringWriter.java:225)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.LongText.calculateHTML(LongText.java:120)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.GuiHtmlElement.calculateHTML(GuiHtmlElement.java:288)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.Group.calculateHTML(Group.java:172)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.GuiHtmlElement.calculateHTML(GuiHtmlElement.java:288)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.Form.calculateHTML(Form.java:233)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.Domain.calculateHTML(Domain.java:213)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at de.tif.jacob.screen.html.Application.calculateHTML(Application.java:208)  ($Id: ExceptionHandler.java,v 1.1 2007/01/19 09:50:40 freegroup Exp $)
  at org.apache.jsp.ie_005fcontent_jsp._jspService(ie_005fcontent_jsp.java:409)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 

Parameters:
th - the throwable to create an extended stack trace of
Returns:
the extended stack trace

jACOB 2.7 API Documentation.