diff options
author | Pixel <Pixel> | 2001-11-28 14:59:50 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-28 14:59:50 +0000 |
commit | 0ddaa5127bf155ffb93f9da13381ad176b43a295 (patch) | |
tree | 8ce67d05aedf5d2e2fcb405e4c4b04facc3d5bad /lib/Task.cc | |
parent | 5212a0752902e64bbd0e24b5c84edb0350e2d3f8 (diff) |
Hopla
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Task.cc b/lib/Task.cc index bc7c7a0..72023e4 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -17,20 +17,17 @@ 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"; + cerr << "Task " << GetName() << " caused an unexpected exception: \"" << e.GetMsg() << "\". Terminating.\n"; return TASK_DONE; } - cerr << "==== Task: \"" << GetName() << "\" exitted. returning " << (state == TASK_ON_HOLD ? "TASK_ON_HOLD" : "TASK_DONE") << endl; return state; } @@ -51,6 +48,7 @@ void Task::Suspend(int newstate) throw (GeneralException) { } void Task::WaitFor(Handle * h, int flags) { + h->SetNonBlock(); TaskMan::WaitFor(h, this, flags); } |