X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/7341eedbaf526ef2f0986b576c656906050e270a..1e8d80477a3e058a30c477955f1e0c56deb6e956:/Exception.hpp diff --git a/Exception.hpp b/Exception.hpp index cd4bd08..1efaf3f 100644 --- a/Exception.hpp +++ b/Exception.hpp @@ -56,13 +56,17 @@ void CYThrow(JSContextRef context, JSValueRef value); #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)) \