diff --git a/src/as/com/threerings/util/ObjectMarshaller.as b/src/as/com/threerings/util/ObjectMarshaller.as index f32fb9850..dd2b8afc1 100644 --- a/src/as/com/threerings/util/ObjectMarshaller.as +++ b/src/as/com/threerings/util/ObjectMarshaller.as @@ -156,11 +156,9 @@ public class ObjectMarshaller public static function validateValue (value :Object) :void // throws ArgumentError { + var s :String; try { - var s :String = getValidationError(value); - if (s != null) { - throw new ArgumentError(s); - } + s = getValidationError(value); } catch (e :Error) { switch (e.errorID) { @@ -170,6 +168,9 @@ public class ObjectMarshaller throw e; // re-throw } } + if (s != null) { + throw new ArgumentError(s); + } } /**