From 8599f0c1a91b101306697310704ef895c70642c2 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 11 Aug 2005 18:43:49 +0000 Subject: [PATCH] Print stacktraces gdb-style, i.e. with a prefixed frame number. git-svn-id: https://svn.dealii.org/trunk@11291 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/exceptions.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deal.II/base/source/exceptions.cc b/deal.II/base/source/exceptions.cc index 71bae91229..f70b54a549 100644 --- a/deal.II/base/source/exceptions.cc +++ b/deal.II/base/source/exceptions.cc @@ -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; } -- 2.39.5