X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b3378a02d0a811be38e530933fb9a57a3012a823..66170b30c7577168b02b9980304f35026a94de1a:/Exception.hpp?ds=sidebyside diff --git a/Exception.hpp b/Exception.hpp index ef6ab99..64f90f2 100644 --- a/Exception.hpp +++ b/Exception.hpp @@ -1,5 +1,5 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2010 Jay Freeman (saurik) + * Copyright (C) 2009-2012 Jay Freeman (saurik) */ /* GNU Lesser General Public License, Version 3 {{{ */ @@ -47,13 +47,13 @@ void CYThrow(JSContextRef context, JSValueRef value); #define CYTry \ try -#define CYCatch \ +#define CYCatch(value) \ catch (const CYException &error) { \ *exception = error.CastJSValue(context); \ - return NULL; \ + return value; \ } catch (...) { \ *exception = CYCastJSValue(context, "catch(...)"); \ - return NULL; \ + return value; \ } // XXX: fix this: _ is not safe; this is /not/ Menes ;P