From e57c35f00e5eba0ee5199997238cf3179a89c4d2 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 12 Nov 2001 19:49:16 +0000 Subject: Plop --- lib/Task.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Task.cc') diff --git a/lib/Task.cc b/lib/Task.cc index 42147d3..c34d0e3 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -12,16 +12,19 @@ int Task::Do() { int Task::Run() { cerr << "Running task '" << GetName() << "'...\n"; try { + cerr << "Launching method Do()...\n"; state = Do(); } catch (TaskSwitch) { - Resume(1); + cerr << "Catch a task switching.\n"; throw; } catch (GeneralException e) { cerr << "Task " << GetName() << " caused an unexpected exception: '" << e.GetMsg() << "', closing it.\n"; return TASK_DONE; } + + cerr << "Task exitted normally.\n"; return state; } @@ -49,8 +52,8 @@ int Task::Suspend() throw (GeneralException) { } void Task::Resume(int val) throw (GeneralException) { + cerr << "Resuming task " << GetName() << "...\n"; if (suspended) { - cerr << "Resuming task " << GetName() << "...\n"; suspended = false; longjmp(env, val); } else { -- cgit v1.2.3