summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/common/exception.py
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2017-08-29 12:45:34 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2017-08-29 12:45:34 +0800
commit7407c6c4cb09a80ec35a48716d4436ff98aba23f (patch)
treef2adc6dc812952123493b9b734196828ed83cf1f /tosca2heat/tosca-parser/toscaparser/common/exception.py
parentd66af1c9113ec897049a55b80ca70496651502b7 (diff)
Add parameter validation in design time
Add validation for SDC from ONAP when use parse in design time: ignore parameter validation and only print warning message. JIRA: PARSER-142 Change-Id: I9372f20816f2acbda83c5f1e4f673f2ffc3c2e94 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
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