From 823761df28ad31cde8a071125b177f49494d804a Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 9 Nov 2001 14:06:58 +0000 Subject: Exceptions... --- lib/Task.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Task.cc') diff --git a/lib/Task.cc b/lib/Task.cc index 27d2a24..faaeaf3 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -12,7 +12,10 @@ int Task::Do() { int Task::Run() { cerr << "Running task '" << GetName() << "'...\n"; try { - while ((state = Do()) != TASK_DONE); + state = Do(); + } + catch (TaskSwitch) { + throw; } catch (GeneralException e) { cerr << "Task " << GetName() << " caused an unexpected exception: '" << e.GetMsg() << "', closing it.\n"; -- cgit v1.2.3