Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33957

GBNG: make display of stack traces configurable

    Details

    • Type: Feature Request
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.4
    • Fix Version/s: 12.2, 19.0
    • Component/s: Gradebook
    • Labels:
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      Stack traces are currently shown by default in GBNG. There is a comment in GradebookNgApplication.java that implies this behaviour can be changed:

      // show internal error page rather than default developer page
      // for production, set to SHOW_NO_EXCEPTION_PAGE
      getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_EXCEPTION_PAGE);
      

      However, flipping this value has no effect because ErrorPage.java does not check which value is being used, and dumps the stacktrace into a Wicket label regardless (it also has a comment that this should be configurable "at some point"):

      // show the stacktrace. This should be configurable at some point
      add(new Label("stacktrace", stacktrace));
      

      This PR proposes the following changes:

      1. make the default value correspond to the sakai.property "portal.error.showdetails"
      2. make ErrorPage.java determine which value is being used, and display the stack trace as appropriate (but admins should always see the stack trace)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bjones86 Brian Jones
                Reporter:
                bjones86 Brian Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code