summaryrefslogtreecommitdiff
path: root/zend/fatalerror.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-06-19 13:48:59 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-06-19 13:48:59 +0200
commitc6c68cbc60711b43e8a570d708db3768240fcc5a (patch)
tree7a249d8981f54028ef03b2eadf9a908f4c5f65c6 /zend/fatalerror.cpp
parent7d915dd6d61786d861ecf3f3415f08b85375a3a5 (diff)
errors are no longer thrown as exceptions, but are php fatal errors, so that they more closely match the zend error reporting system
Diffstat (limited to 'zend/fatalerror.cpp')
-rw-r--r--zend/fatalerror.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/zend/fatalerror.cpp b/zend/fatalerror.cpp
new file mode 100644
index 0000000..e57be73
--- /dev/null
+++ b/zend/fatalerror.cpp
@@ -0,0 +1,31 @@
+/**
+ * FatalError.cpp
+ *
+ * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
+ * @copyright 2014 Copernica BV
+ */
+#include "includes.h"
+
+/**
+ * Set up namespace
+ */
+namespace Php {
+
+/**
+ * Report this error as a fatal error
+ * @return bool
+ */
+bool FatalError::report() const
+{
+ // report the error
+ zend_error(E_ERROR, "%s", what());
+
+ // return true: it was reported
+ return true;
+}
+
+/**
+ * End of namespace
+ */
+}
+