From 7407c6c4cb09a80ec35a48716d4436ff98aba23f Mon Sep 17 00:00:00 2001 From: shangxdy Date: Tue, 29 Aug 2017 12:45:34 +0800 Subject: 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 --- tosca2heat/tosca-parser/toscaparser/common/exception.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tosca2heat/tosca-parser/toscaparser/common/exception.py') 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 @@ -205,6 +205,13 @@ class ExceptionCollector(object): else: 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 -- cgit 1.2.3-korg