diff options
author | Pixel <Pixel> | 2001-11-12 19:49:16 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-12 19:49:16 +0000 |
commit | e57c35f00e5eba0ee5199997238cf3179a89c4d2 (patch) | |
tree | 6e734a152ec360c42b72e01948eb3e444a77f8bb /lib/Task.cc | |
parent | 709543dec3eaa07f7d2d7da2157d1f9159bad5d8 (diff) |
Plop
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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 { |