Php5 exception support from Ollie Betts

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-02 22:11:16 +00:00
commit c8152a2016

View file

@ -15,8 +15,11 @@
#ifdef SWIGPHP4
%{
/* We should make use of "code" if we can */
#define SWIG_exception(code, msg) { zend_error(E_ERROR, msg); }
#if PHP_MAJOR_VERSION < 5
# define SWIG_exception(code, msg) { zend_error(E_ERROR, msg); }
#else
# define SWIG_exception(code, msg) { zend_throw_exception(NULL, msg, code TSRMLS_CC); }
#endif
%}
#endif