Index: vhUnitTest/TECH/ClassUtils.cls.xml =================================================================== diff -u -r1905 -r2137 --- vhUnitTest/TECH/ClassUtils.cls.xml (.../ClassUtils.cls.xml) (revision 1905) +++ vhUnitTest/TECH/ClassUtils.cls.xml (.../ClassUtils.cls.xml) (revision 2137) @@ -46,29 +46,62 @@ Index: TECH/ClassUtils.cls.xml =================================================================== diff -u -r2131 -r2137 --- TECH/ClassUtils.cls.xml (.../ClassUtils.cls.xml) (revision 2131) +++ TECH/ClassUtils.cls.xml (.../ClassUtils.cls.xml) (revision 2137) @@ -104,8 +104,9 @@ set result = $zobjClassMethod(ClassName,"IsValidDT",Value) } If ('result){ - Set Message = "Validate van '"_Value_"' is niet gelukt." - Set:$G(%objlasterror)'="" Message = Message_" "_$$ParseStatus^vhLib(%objlasterror) + Set Message = "Validate van "_ ClassName_" is niet gelukt." + Set:('$IsObject(Value)) Message = Message_ " (Waarde : '"_Value_"')" + Set:(($G(%objlasterror)'="") && '(%objlasterror [ "ECODETRAP")) Message = Message_" "_$$ParseStatus^vhLib(%objlasterror) Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New(Message)) } quit result @@ -132,20 +133,24 @@ set Property = itProperties.Next() continue:Property.Calculated set PropertyValue = $zobjProperty(Object,Property.Name) - if (Property.Collection || (Property.Collection = "list")) { - set itCollection = ##class(TECH.ListIterator).%New(PropertyValue) + if (Property.Collection || (Property.Collection = "list") || (Property.Collection = "array")) { + If (Property.Collection = "array"){ + set itCollection = ##class(TECH.ArrayIterator).%New(PropertyValue) + }Else{ + set itCollection = ##class(TECH.ListIterator).%New(PropertyValue) + } while (result) && (itCollection.HasNext()) { set CollectionValue = itCollection.Next() set result = ..ValueIsValid(CollectionValue,Property.Type) If ('result){ - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Validatie van '"_Property_"' met waarde '"_PropertyValue_"' is niet correct, type: "_Property.Type)) + Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Validatie van '"_Property.%ClassName(1)_"' met waarde '"_PropertyValue_"' is niet correct, type: "_Property.Type)) } } } elseif $length(PropertyValue) { - Set result = ..ValueIsValid(PropertyValue,Property.Type) + set result = $zobjMethod(Object,Property.Name_"IsValidDT",PropertyValue) If ('result){ - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Validatie van '"_Property_"' met waarde '"_PropertyValue_"' is niet correct, type: "_Property.Type)) + Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Validatie van '"_Property.%ClassName(1)_"' is niet correct. (Waarde: '"_PropertyValue_"' is niet correct, Type: '"_Property.Type_"'")) } } }