classes/Ergo/Error/ErrorProxy.php
public function _handleException($e)
	{
		if(!$this->_inError && $handler = $this->_application->errorHandler())
		{
			$this->_inError = true;
			$handler->handle($e);
			$this->_inError = false;
		}
		else
		{
			if(php_sapi_name() == 'cli')
			{
				echo $e->__toString();
				exit(1);
			}
			else
			{
				header('HTTP/1.1 500 Internal Server Error');

				echo "<h1>Error: ".$e->getMessage().'</h1>';
				echo '<pre>'.$e->__toString().'</pre>';
				exit(1);
			}
		}
	}
public function _handleException($e)
	{
		if(!$this->_inError && $handler = $this->_application->errorHandler())
		{
			$this->_inError = true;
			$handler->handle($e);
			$this->_inError = false;
		}
		else
		{
			if(php_sapi_name() == 'cli')
			{
				echo $e->__toString();
				exit(1);
			}
			else
			{
				header('HTTP/1.1 500 Internal Server Error');

				echo "<h1>Error: ".$e->getMessage().'</h1>';
				echo '<pre>'.$e->__toString().'</pre>';
				exit(1);
			}
		}
	}
public function _handleException ( $ e ) { if ( ! $ this -> _inError && $ handler = $ this -> _application -> errorHandler ( ) ) { $ this -> _inError = true ; $ handler -> handle ( $ e ) ; $ this -> _inError = false ; } else { if ( php_sapi_name ( ) == 'cli' ) { echo $ e -> __toString ( ) ; exit ( 1 ) ; } else { header ( 'HTTP/1.1 500 Internal Server Error' ) ; echo "<h1>Error: " . $ e -> getMessage ( ) . '</h1>' ; echo '<pre>' . $ e -> __toString ( ) . '</pre>' ; exit ( 1 ) ; } } }
PHP exception handler interface
@see set_exception_handler
PHP exception handler interface