]> git.saurik.com Git - cycript.git/blobdiff - Execute.cpp
Try (and almost fail) to compile armv6 on -mthumb.
[cycript.git] / Execute.cpp
index 139aadad8b9529d59da3f4b070ebc8c8cc26aa42..e1181463a1b45a5f618bbc41d7190df6dc49f2a4 100644 (file)
@@ -451,18 +451,21 @@ static JSValueRef Array_callAsFunction_toCYON(JSContextRef context, JSObjectRef
     bool comma(false);
 
     for (size_t index(0), count(CYCastDouble(context, length)); index != count; ++index) {
-        JSValueRef value(CYGetProperty(context, _this, index));
-
         if (comma)
             str << ',';
         else
             comma = true;
 
-        if (!JSValueIsUndefined(context, value))
-            str << CYPoolCCYON(pool, context, value);
-        else {
-            str << ',';
-            comma = false;
+        try {
+            JSValueRef value(CYGetProperty(context, _this, index));
+            if (!JSValueIsUndefined(context, value))
+                str << CYPoolCCYON(pool, context, value);
+            else {
+                str << ',';
+                comma = false;
+            }
+        } catch (const CYException &error) {
+            str << "@error";
         }
     }