summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/common/exception.py
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/common/exception.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/common/exception.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/common/exception.py b/tosca2heat/tosca-parser/toscaparser/common/exception.py
index 13ccabd..9fb331d 100644
--- a/tosca2heat/tosca-parser/toscaparser/common/exception.py
+++ b/tosca2heat/tosca-parser/toscaparser/common/exception.py
@@ -206,6 +206,13 @@ class ExceptionCollector(object):
raise exception
@staticmethod
+ def removeException(exception_type):
+ if ExceptionCollector.collecting:
+ for i, e in enumerate(ExceptionCollector.exceptions):
+ if isinstance(e, exception_type):
+ del ExceptionCollector.exceptions[i]
+
+ @staticmethod
def exceptionsCaught():
return len(ExceptionCollector.exceptions) > 0