summaryrefslogtreecommitdiff
path: root/lib/Task.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-11-09 14:06:58 +0000
committerPixel <Pixel>2001-11-09 14:06:58 +0000
commit823761df28ad31cde8a071125b177f49494d804a (patch)
tree9e063f7eb4d5ad48039e957f0ec7d5c70fcefe0d /lib/Task.cc
parent69d9cab0c415837552a84f17366356e9571fdbda (diff)
Exceptions...
Diffstat (limited to 'lib/Task.cc')
-rw-r--r--lib/Task.cc5
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";