diff options
author | Pixel <Pixel> | 2001-11-09 14:06:58 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-09 14:06:58 +0000 |
commit | 823761df28ad31cde8a071125b177f49494d804a (patch) | |
tree | 9e063f7eb4d5ad48039e957f0ec7d5c70fcefe0d /lib/Task.cc | |
parent | 69d9cab0c415837552a84f17366356e9571fdbda (diff) |
Exceptions...
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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"; |