Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4074976

Can't get Stack Trace into string easily; the only option is to print it.

XMLWordPrintable

    • generic, sparc
    • generic, solaris_2.5.1



      Name: tb29552 Date: 08/27/97


      company - Cornell University , email - ###@###.###

      Hi, I was just noticing that the only way to get the
      stack trace of an exception is to to do a
      "PrintStackTrace" into a PrintStream. I'm writing a
      scientific application where I have some fear that some
      section of the calculation might fail; execution is
      controlled by a particular class which executes each
      segment in try catch brackets -- when a calculation
      blows up, it would be nice to be able to put as much of
      the crash and burn record in with the data from the
      calculation as possible; including the stack trace.
      Prehaps I just don't want to write it to a PrintStream
      -- I might want to preface the stack trace with comment
      characters so it won't mess up the program I use to
      interpret output files, for instance.

      As such, I'd really like to have a way to put the stack
      trace into a string -- this might be nice to have in
      future versions of java. I'm sure that other java
      programmers face similar problems.

      ======================================================================

            apalanissunw Anand Palaniswamy (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: