From e10639753d7dbd368f5edc2555d75c4b5905ba3b Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 21 Nov 2011 13:27:53 -0800 Subject: GeneralException() will now trace the callstack and store this, for debugging purposes. --- src/Task.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Task.cc') diff --git a/src/Task.cc b/src/Task.cc index 6a94267..5623698 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -61,6 +61,9 @@ void Balau::Task::coroutine() { } catch (GeneralException & e) { Printer::log(M_WARNING, "Task %s at %p caused an exception: `%s' - stopping.", getName(), this, e.getMsg()); + std::vector trace = e.getTrace(); + for (std::vector::iterator i = trace.begin(); i != trace.end(); i++) + Printer::log(M_DEBUG, "%s", i->to_charp()); m_status = FAULTED; } catch (...) { -- cgit v1.2.3