*------------------------------------------------------- DEFINE Class1 AS Custom *------------------------------------------------------- * Define properties etc. (Other properties omitted for demonstration purposes) ADD OBJECT PunchExceptions AS Collection * --------------------------------------------------- PROCEDURE IdentifyExceptions * --------------------------------------------------- LOCAL clsPunchException AS lppPunchException * Do various checks etc. ... IF (condition is true) THEN clsPunchException = CREATEOBJECT("lppPunchException") WITH clsPunchException .Code = "CodeValue" .Description = "DescriptionValue" .Reason = "ReasonValue" .Type = 0 ENDWITH * <<< This is where the error occurs. >>> This.PunchExceptions.Add(clsPunchException) ENDIF * Cleanup code omitted. ENDPROC ENDDEFINE *------------------------------------------------------- DEFINE CLASS lppPunchException AS Custom *------------------------------------------------------- #DEFINE mconZeroLengthString "" * Define properties and set default values * ---------------------------------------------- Code = mconZeroLengthString Description = mconZeroLengthString Reason = mconZeroLengthString Type = 0 ENDDEFINEThe interesting thing here is that the error is generated every time the .Add method is called for the collection. However, even though the error is generated, the object is actually added to the collection. Given that, I COULD trap for it and ignore it, but I want to understand why it is happening in the first place. Also interesting is the fact that I have many other classes defined that do the same thing (i.e. creating an object and adding it to a collection) and this is the only place where the error is generated.