diff options
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Task.cc b/lib/Task.cc index 9ed1589..60a9872 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -17,16 +17,20 @@ int Task::Do() throw (GeneralException) { } int Task::Run() { + cerr << "==== Task: \"" << GetName() << "\" running.\n"; try { state = Do(); } catch (TaskSwitch) { + cerr << "==== Task: \"" << GetName() << "\" caugh a task switch. returning " << (state == TASK_ON_HOLD ? "TASK_ON_HOLD" : "TASK_DONE") << endl; return state; } catch (GeneralException e) { + cerr << "Task " << GetName() << " caused an unexpected exception. Terminating.\n"; return TASK_DONE; } + cerr << "==== Task: \"" << GetName() << "\" exitted. returning " << (state == TASK_ON_HOLD ? "TASK_ON_HOLD" : "TASK_DONE") << endl; return state; } |