<commit_before><?php

/**
 * A basic handler for PHP errors and exceptions which consolidates errors
 * into error exceptions provides for simple logging and error formatting.
 */
abstract class Ergo_Error_AbstractErrorHandler
	implements Ergo_Error_ErrorHandler
{
	private $_proxy;
	private $_logger;

	/**
	 * Constructor
	 * @param object an optional Ergo_Logger instance
	 */
	public function __construct($logger=null)
	{
		if(is_object($logger))
		{
			$this->_logger = new Ergo_Logging_LoggerMultiplexer();
			$this->_logger->addLoggers($logger);
		}
	}

	/* (non-phpdoc)
	 * @see Ergo_Error_ErrorHandler::logger()
	 */
	public function logger()
	{
		if(!isset($this->_logger))
		{
			$this->_logger = new Ergo_Logging_LoggerMultiplexer();
		}

		return $this->_logger;
	}

	/* (non-phpdoc)
	 * @see Ergo_Error_ErrorHandler::context()
	 */
	public function context()
	{
		return array();
	}

	/**
	* Determines whether the exception should halt execution
	* @return bool
	*/
	protected function isExceptionHalting($e)
	{
		if ($e instanceof ErrorException)
		{
			$ignore = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_STRICT;
			return (($ignore & $e->getSeverity()) == 0);
		}

		return true;
	}
}<commit_msg>All errors are halting by default.<commit_after><?php

/**
 * A basic handler for PHP errors and exceptions which consolidates errors
 * into error exceptions provides for simple logging and error formatting.
 */
abstract class Ergo_Error_AbstractErrorHandler
	implements Ergo_Error_ErrorHandler
{
	private $_proxy;
	private $_logger;

	/**
	 * Constructor
	 * @param object an optional Ergo_Logger instance
	 */
	public function __construct($logger=null)
	{
		if(is_object($logger))
		{
			$this->_logger = new Ergo_Logging_LoggerMultiplexer();
			$this->_logger->addLoggers($logger);
		}
	}

	/* (non-phpdoc)
	 * @see Ergo_Error_ErrorHandler::logger()
	 */
	public function logger()
	{
		if(!isset($this->_logger))
		{
			$this->_logger = new Ergo_Logging_LoggerMultiplexer();
		}

		return $this->_logger;
	}

	/* (non-phpdoc)
	 * @see Ergo_Error_ErrorHandler::context()
	 */
	public function context()
	{
		return array();
	}

	/**
	* Determines whether an exception is recoverable
	* @return bool
	*/
	protected function isExceptionRecoverable($e)
	{
		if ($e instanceof ErrorException)
		{
			$ignore = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_STRICT;
			return (($ignore & $e->getSeverity()) != 0);
		}

		return false;
	}

	/**
	* Determines whether the exception should halt execution
	* @return bool
	*/
	protected function isExceptionHalting($e)
	{
		return true;
	}
}
{'fraction_non_alphanumeric': 0.123000761614623, 'fraction_numerical': 0.0007616146230007616, 'mean_word_length': 4.051923076923077, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6334457', 'n_tokens_mistral': 930, 'n_tokens_neox': 847, 'n_words': 206}