summaryrefslogtreecommitdiffstats
path: root/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php
new file mode 100644
index 0000000..a72d7df
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace PhpOffice\PhpSpreadsheet\Calculation;
+
+class ExceptionHandler
+{
+ /**
+ * Register errorhandler.
+ */
+ public function __construct()
+ {
+ set_error_handler([Exception::class, 'errorHandlerCallback'], E_ALL);
+ }
+
+ /**
+ * Unregister errorhandler.
+ */
+ public function __destruct()
+ {
+ restore_error_handler();
+ }
+}