Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-48

static option for reversing the stacktrace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • None
    • None
    • Operating System: other
      Platform: Other

    • 14357

    Description

      The nestableDelegate dumps the stacktrace bottomup instead of topdown as is the custom in the JDK
      (especially in JDK 1.4's own chained exceptions).

      Thus when using NestableException you
      will always see the first low-level exception (e.g. an Null Exception) and you'll have to go all the
      way to the bottom to see the highlevel exception (e.g. an HibernateQueryException: Error while
      parsing query at 's.count()')

      This is not very friendly to users because hopefully the
      highlevel exception will be the best explanation in 9 out of 10 causes, it is only when debugging or
      in misbehaved exception handling one like to see the root causes - and THEN one can go down and read
      the bottom of the stack trace.

      Thus, I would suggest that you make it possible to have
      NestableDelegate print the stacktrace in reverce so the highlevel exception get printed first
      and THEN the lower-levels.

      And optimal one could set an
      NestableDelegate.printStackTraceTopDown=true as an system property so one could choose
      which strategy should be activated in the system.

      Am I making any sense ?

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--Patch.txt
          28 kB
          Mohan Kishore
        2. ASF.LICENSE.NOT.GRANTED--Patch.txt
          8 kB
          Mohan Kishore

        Activity

          People

            Unassigned Unassigned
            max@eos.dk Max Rydahl Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: