classes/Ergo/Error/ErrorProxy.php
public function _shutdown()
	{
		if ($this->_registered && $error = error_get_last())
		{
			try
			{
				// clear the output buffer if we can
				if(ob_get_level()>=1) ob_end_clean();

				// build an error exception
				if (isset($error['type']) && in_array($error['type'],
					array(E_ERROR, E_PARSE, E_COMPILE_ERROR)))
				{
					$this->_handleError(
						$error['type'],
						$error['message'],
						$error['file'],
						$error['line']
						);
				}
			}
			catch(Exception $e)
			{
			}
		}
	}
public function _shutdown()
	{
		if ($this->_registered && $error = error_get_last())
		{
			try
			{
				// clear the output buffer if we can
				if(ob_get_level()>=1) ob_end_clean();

				// build an error exception
				if (isset($error['type']) && in_array($error['type'],
					array(E_ERROR, E_PARSE, E_COMPILE_ERROR)))
				{
					$this->_handleError(
						$error['type'],
						$error['message'],
						$error['file'],
						$error['line']
						);
				}
			}
			catch(Exception $e)
			{
			}
		}
	}
public function _shutdown ( ) { if ( $ this -> _registered && $ error = error_get_last ( ) ) { try { // clear the output buffer if we can if ( ob_get_level ( ) >= 1 ) ob_end_clean ( ) ; // build an error exception if ( isset ( $ error [ 'type' ] ) && in_array ( $ error [ 'type' ] , array ( E_ERROR , E_PARSE , E_COMPILE_ERROR ) ) ) { $ this -> _handleError ( $ error [ 'type' ] , $ error [ 'message' ] , $ error [ 'file' ] , $ error [ 'line' ] ) ; } } catch ( Exception $ e ) { } } }
PHP shutdown function to catch fatal errors
@see http://www.eggplant.ws/blog/php/mayday-php-going-down/
@see register_shutdown_function
PHP shutdown function to catch fatal errors