summaryrefslogtreecommitdiffstats
path: root/nfvparser/toscaparser/common/exception.py
diff options
context:
space:
mode:
Diffstat (limited to 'nfvparser/toscaparser/common/exception.py')
-rw-r--r--nfvparser/toscaparser/common/exception.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/nfvparser/toscaparser/common/exception.py b/nfvparser/toscaparser/common/exception.py
index 13ccabd..67a9f7f 100644
--- a/nfvparser/toscaparser/common/exception.py
+++ b/nfvparser/toscaparser/common/exception.py
@@ -20,7 +20,7 @@ import traceback
from toscaparser.utils.gettextutils import _
-log = logging.getLogger(__name__)
+log = logging.getLogger('tosca')
class TOSCAException(Exception):
@@ -206,6 +206,13 @@ class ExceptionCollector(object):
raise exception
@staticmethod
+ def removeException(exception_type):
+ if ExceptionCollector.collecting and ExceptionCollector.exceptions:
+ for i, e in enumerate(ExceptionCollector.exceptions):
+ if isinstance(e, exception_type):
+ del ExceptionCollector.exceptions[i]
+
+ @staticmethod
def exceptionsCaught():
return len(ExceptionCollector.exceptions) > 0