23 lines
380 B
PHP
23 lines
380 B
PHP
|
<?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();
|
||
|
}
|
||
|
}
|