-/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2015 Jay Freeman (saurik)
+/* Cycript - The Truly Universal Scripting Language
+ * Copyright (C) 2009-2016 Jay Freeman (saurik)
*/
/* GNU Affero General Public License, Version 3 {{{ */
#define CYCatch_(value, name) \
catch (const CYException &error) { \
*exception = error.CastJSValue(context, name); \
+ _assert(*exception != NULL); \
return value; \
} catch (...) { \
*exception = CYCastJSValue(context, "catch(...)"); \
+ _assert(*exception != NULL); \
return value; \
}
#define CYCatch(value) \
CYCatch_(value, "Error")
+#define CYCatchObject() \
+ CYCatch(JSObjectMake(context, NULL, NULL))
#define _assert_(mode, test, code, format, ...) do \
if (!(test)) \