summaryrefslogtreecommitdiff
path: root/project2/if.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/if.cpp')
-rw-r--r--project2/if.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/project2/if.cpp b/project2/if.cpp
index fe47059..a69fd8d 100644
--- a/project2/if.cpp
+++ b/project2/if.cpp
@@ -41,7 +41,8 @@ If::If(const xmlpp::Element * e) :
SourceObject(e),
Iterate(e),
RowView(e),
- IfSet(e)
+ IfSet(e),
+ localErrorHandling(e->get_attribute_value("errorHandling") == "local")
{
}
@@ -66,8 +67,22 @@ If::execute() const
{
if (passes()) {
Logger()->message(LOG_DEBUG, "IfSet passed");
- BOOST_FOREACH(const SubNOEs::value_type & sq, subNOEs.get<bySOOrder>()) {
- sq->execute();
+ try {
+ BOOST_FOREACH(const SubNOEs::value_type & sq, subNOEs.get<bySOOrder>()) {
+ if (!sq->isErrorHandler) {
+ sq->execute();
+ }
+ }
+ }
+ catch (...) {
+ BOOST_FOREACH(const SubNOEs::value_type & sq, subNOEs.get<bySOOrder>()) {
+ if (sq->isErrorHandler) {
+ sq->execute();
+ }
+ }
+ if (!localErrorHandling) {
+ throw;
+ }
}
}
}