public static function error_handler($severity, $message, $filepath, $line)
	{
		// don't do anything if error reporting is disabled
		if (error_reporting() !== 0)
		{
			$fatal = (bool)( ! in_array($severity, \Config::get('errors.continue_on', array())));

			if ($fatal)
			{
				throw new \PhpErrorException($message, $severity, 0, $filepath, $line);
			}
			else
			{
				// non-fatal, recover from the error
				$e = new \PhpErrorException($message, $severity, 0, $filepath, $line);
				$e->recover();
			}
		}

		return true;
	}