|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sakaiproject.portal.util.ErrorReporter
public class ErrorReporter
ErrorReporter helps with end-user formatted error reporting, user feedback collection, logging and emailing for uncaught throwable based errors. This is a util class as it's used by both the CharronPortal and the SkinnableCharronPortal.
| Constructor Summary | |
|---|---|
ErrorReporter()
|
|
| Method Summary | |
|---|---|
static String |
computeSha1(String content)
|
protected Throwable |
getCause(Throwable t)
Compute the cause of a throwable, checking for the special ServletException case, and the points-to-self case. |
protected String |
getOneTrace(Throwable t)
Format a one-level stack trace, just showing the place where the exception occurred (the first entry in the stack trace). |
protected String |
getStackTrace(Throwable t)
Format the full stack trace. |
protected void |
logAndMail(String bugId,
String usageSessionId,
String userId,
String time,
String problem,
String problemdigest,
String requestURI,
String userReport)
Log and email the error report details. |
protected void |
logAndMail(String bugId,
String usageSessionId,
String userId,
String time,
String problem,
String problemdigest,
String requestURI,
String requestDisplay,
String placementDisplay,
String userReport)
|
void |
postResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Accept the user feedback post. |
void |
report(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t)
Handle the inital report of an error, from an uncaught throwable, with a user display. |
void |
report(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t,
boolean fullPage)
|
String |
reportFragment(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t)
Handle the inital report of an error, from an uncaught throwable, with a user display - but returning a string that contins a fragment. |
void |
thanksResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Accept the user feedback post. |
protected String |
throwableDisplay(Throwable t)
Format a throwable for display: list the various throwables drilling down the cause, and full stacktrack for the final cause. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorReporter()
| Method Detail |
|---|
public static String computeSha1(String content)
protected String getStackTrace(Throwable t)
t - The throwable.
protected String getOneTrace(Throwable t)
t - The throwable.
protected Throwable getCause(Throwable t)
t - The throwable.
protected String throwableDisplay(Throwable t)
t - The throwable.
protected void logAndMail(String bugId,
String usageSessionId,
String userId,
String time,
String problem,
String problemdigest,
String requestURI,
String userReport)
usageSessionId - The end-user's usage session id.userId - The end-user's user id.time - The time of the error.problem - The stacktrace of the error.problemdigest - The sha1 digest of the stacktrace.requestURI - The request URI.userReport - The end user comments.object - placementDisplay -
protected void logAndMail(String bugId,
String usageSessionId,
String userId,
String time,
String problem,
String problemdigest,
String requestURI,
String requestDisplay,
String placementDisplay,
String userReport)
public String reportFragment(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t)
req - The request.res - The response.t - The uncaught throwable.
public void report(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t)
req - The request.res - The response.t - The uncaught throwable.
public void report(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
Throwable t,
boolean fullPage)
public void postResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
req - The request.res - The response.
public void thanksResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
req - The request.res - The response.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||