summaryrefslogtreecommitdiff
path: root/lib/Task.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-12-23 01:45:18 +0000
committerPixel <Pixel>2001-12-23 01:45:18 +0000
commitb507db3acb1114a2c900d0e2409cda73f54e02d7 (patch)
treef2df356d725366c371b413cc9f863dd6dd797f79 /lib/Task.cc
parent477886b341edc16634b39f4a839e595add883f17 (diff)
Big job on processus
Diffstat (limited to 'lib/Task.cc')
-rw-r--r--lib/Task.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Task.cc b/lib/Task.cc
index 839c003..3cac327 100644
--- a/lib/Task.cc
+++ b/lib/Task.cc
@@ -33,6 +33,22 @@ int Task::Run() {
return state;
}
+int Task::DryRun() {
+ while (state != TASK_DONE) {
+ try {
+ state = Do();
+ }
+ catch (TaskSwitch) {
+ }
+ catch (GeneralException e) {
+ cerr << _("Task ") << GetName() << _(" caused an unexpected exception during dry-run: \"") << e.GetMsg() << _("\". Terminating.\n");
+ state = TASK_DONE;
+ }
+ }
+
+ return state;
+}
+
int Task::GetState() {
return state;
}