From 32db838be2bdd318a48f24d3276e589e8ec5c1e7 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 11 Sep 2009 16:49:37 +0000 Subject: [PATCH] Hmm don't throw the ArgumentError inside our own catch, even though we should have re-thrown it. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5951 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/ObjectMarshaller.as | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); + } } /**