Since this UDF can theoretically change multiple instances of a class (its looping through a collection) - if I was coding this UDF - I would probably create it so that it returned the number of instances changed (which may be usefull information) and if an error occurred it would return 0 (zero nothing changed) and then @ERROR would indicate the error.