summaryrefslogtreecommitdiff
path: root/Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp')
-rw-r--r--Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp b/Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp
index a5f7b96..9efdf93 100644
--- a/Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp
+++ b/Examples/Exceptions/ExceptionCatch/exceptionCatch.cpp
@@ -11,6 +11,7 @@
* Libraries used.
*/
#include <phpcpp.h>
+#include <iostream>
/**
* Namespace to use
@@ -39,7 +40,8 @@ void my_catch_exception_function(Php::Parameters &params)
}
catch (Php::Exception &exception)
{
- // @todo handle the exception that was thrown from PHP space
+ // handle the exception that was thrown from PHP space
+ std::cout << "exception caught in CPP code" << std::endl;
}
}
@@ -54,9 +56,7 @@ extern "C"
static Php::Extension extension("my_exception_catch","1.0");
// add function to extension
- extension.add("my_catch_exception_function", my_catch_exception_function, {
- Php::ByVal("callback", Php::callableType);
- });
+ extension.add("my_catch_exception_function", my_catch_exception_function);
// return the extension module
return extension.module();