# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Calculation/ExceptionHandler.php

TablePress – Tables in WordPress made easy, version 3.4. 25 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/ExceptionHandler.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Calculation/ExceptionHandler.php
- Modified: 2025-01-08T09:25:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/ExceptionHandler.php#L10-L20`.

```php
<?php

namespace TablePress\PhpOffice\PhpSpreadsheet\Calculation;

class ExceptionHandler
{
	/**
	 * Register errorhandler.
	 */
	public function __construct()
	{
		/** @var callable $callable */
		$callable = [Exception::class, 'errorHandlerCallback'];
		set_error_handler($callable, E_ALL);
	}

	/**
	 * Unregister errorhandler.
	 */
	public function __destruct()
	{
		restore_error_handler();
	}
}

```
