| java.lang.Object org.sakaiproject.portal.util.ErrorReporter
ErrorReporter | public class ErrorReporter (Code) | |
ErrorReporter helps with end-user formatted error reporting, user feedback
collection, logging and emailing for uncaught throwable based errors.
|
Method Summary | |
public 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.
Parameters: t - The throwable. | 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).
Parameters: t - The throwable. | protected String | getStackTrace(Throwable t) Format the full stack trace.
Parameters: t - The throwable. | protected void | logAndMail(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 usageSessionId, String userId, String time, String problem, String problemdigest, String requestURI, String requestDisplay, String placementDisplay, String userReport) | public void | postResponse(HttpServletRequest req, HttpServletResponse res) Accept the user feedback post. | public void | report(HttpServletRequest req, HttpServletResponse res, Throwable t) Handle the inital report of an error, from an uncaught throwable, with a
user display. | public void | thanksResponse(HttpServletRequest req, 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.
Parameters: t - The throwable. |
ErrorReporter | public ErrorReporter()(Code) | | |
getCause | protected Throwable getCause(Throwable t)(Code) | | Compute the cause of a throwable, checking for the special
ServletException case, and the points-to-self case.
Parameters: t - The throwable. The cause of the throwable, or null if there is none. |
getOneTrace | protected String getOneTrace(Throwable t)(Code) | | Format a one-level stack trace, just showing the place where the
exception occurred (the first entry in the stack trace).
Parameters: t - The throwable. A display of the first stack trace entry for the throwable. |
getStackTrace | protected String getStackTrace(Throwable t)(Code) | | Format the full stack trace.
Parameters: t - The throwable. A display of the full stack trace for the throwable. |
logAndMail | protected void logAndMail(String usageSessionId, String userId, String time, String problem, String problemdigest, String requestURI, String userReport)(Code) | | Log and email the error report details.
Parameters: usageSessionId - The end-user's usage session id. Parameters: userId - The end-user's user id. Parameters: time - The time of the error. Parameters: problem - The stacktrace of the error. Parameters: problemdigest - The sha1 digest of the stacktrace. Parameters: requestURI - The request URI. Parameters: userReport - The end user comments. Parameters: object - Parameters: placementDisplay - |
report | public void report(HttpServletRequest req, HttpServletResponse res, Throwable t)(Code) | | Handle the inital report of an error, from an uncaught throwable, with a
user display.
Parameters: req - The request. Parameters: res - The response. Parameters: t - The uncaught throwable. |
throwableDisplay | protected String throwableDisplay(Throwable t)(Code) | | Format a throwable for display: list the various throwables drilling down
the cause, and full stacktrack for the final cause.
Parameters: t - The throwable. The string display of the throwable. |
|
|