From 0ddaa5127bf155ffb93f9da13381ad176b43a295 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 28 Nov 2001 14:59:50 +0000 Subject: Hopla --- lib/Task.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Task.cc') 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); } -- cgit v1.2.3