From 9e430cd9d4722c3e614c8a2fd822cff1604be1f2 Mon Sep 17 00:00:00 2001 From: Pavel Aharoni Date: Wed, 24 May 2017 13:23:12 +0300 Subject: [SDC-24] error handling Change-Id: Iac97052fab32f638d4cf52b094caad31f6d76902 Signed-off-by: Pavel Aharoni --- .../openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java') diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java index 04836ff..5ab816f 100644 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java +++ b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java @@ -9,6 +9,7 @@ import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; import org.openecomp.sdc.toscaparser.api.elements.AttributeDef; import org.openecomp.sdc.toscaparser.api.elements.EntityType; import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; +import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; public class StatefulEntityType extends EntityType { @@ -48,7 +49,7 @@ public class StatefulEntityType extends EntityType { } else{ defs = null; - ExceptionCollector.appendException(String.format( + ThreadLocalsHolder.getCollector().appendException(String.format( "InvalidTypeError: \"%s\" is not a valid type",entityType)); } } @@ -66,7 +67,7 @@ public class StatefulEntityType extends EntityType { Object to = me.getValue(); if(to == null || !(to instanceof LinkedHashMap)) { String s = to == null ? "null" : to.getClass().getSimpleName(); - ExceptionCollector.appendException(String.format( + ThreadLocalsHolder.getCollector().appendException(String.format( "Unexpected type error: property \"%s\" has type \"%s\" (expected dict)",pdname,s)); continue; } -- cgit 1.2.3-korg