summaryrefslogtreecommitdiff
path: root/src/function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/function.cpp')
-rw-r--r--src/function.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/function.cpp b/src/function.cpp
index 9376751..fe96745 100644
--- a/src/function.cpp
+++ b/src/function.cpp
@@ -38,20 +38,15 @@ void invoke_function(INTERNAL_FUNCTION_PARAMETERS)
Parameters params(this_ptr, ZEND_NUM_ARGS());
// the function could throw an exception
- //try
- //{
+ try
+ {
// get the result
result = function->invoke(*PHPCPP_G(environment), params);
- //}
- //catch (const Php::Exception &exception)
- //{
- // cout << "got exception";
-
- // @todo throw the exception....
-
-
-
- //}
+ }
+ catch (const Php::Exception &exception)
+ {
+ zend_throw_exception(zend_exception_get_default(), exception.getMessage(), 0 TSRMLS_CC);
+ }
}
/**