]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Print stacktraces gdb-style, i.e. with a prefixed frame number.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Aug 2005 18:43:49 +0000 (18:43 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Aug 2005 18:43:49 +0000 (18:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@11291 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/exceptions.cc

index 71bae91229040d666bc12dcc3f98f6125e26e544..f70b54a549d5288c2c0b15b8ebfdd2718a0d40c0 100644 (file)
@@ -157,9 +157,12 @@ void ExceptionBase::print_stack_trace (std::ostream &out) const
      ++frame;
 
                                    // output the rest
+   const unsigned int first_significant_frame = frame;
    for (; frame < n_stacktrace_frames; ++frame)
-      out << stacktrace[frame]
-         << std::endl;
+     out << '#' << frame - first_significant_frame
+         << "  "
+         << stacktrace[frame]
+         << std::endl;
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.