Trigger stupid errors who should be exceptions

@param int    $errno   error number
@param string $errstr  error message
@param mixed  $errfile error file
@param int    $errline error line

@return null
492122
public function errorHandler($errno, $errstr, $errfile, $errline)
    {
        preg_match('/(ORA-)(\d+)/', $errstr, $ora_error);
        if ($ora_error) {
            $this->_last_error = intval($ora_error[2]);
        } else {
            $this->setError($this->_con);
        }
    }
226345
public static function error_handler($errno, $errstr, $errfile, $errline)
    {
        self::flush(true);

        $response = PheryResponse::factory()->exception($errstr, array(
            'code' => $errno,
            'file' => self::$expose_paths ? $errfile : pathinfo($errfile, PATHINFO_BASENAME),
            'line' => $errline
        ));

        self::respond($response);
        self::shutdown_handler(false, true);
    }
1299898
public function handleError($errNumber, $errString, $errFile ='', $errLine = 0)
	{
		$interfaceSettings = $this->cmd->getConfigOpt('interface');
		$textColor = $interfaceSettings['error']['text_color'];
		$textBgColor = $interfaceSettings['error']['text_background'];

		$this->env->sendOutput('Error: ' . $errString, $textColor, $textBgColor);
		exit;
	}
399858
public static function handleError($errno, $errstr, $errfile, $errline, $errcontext, $isException = false)
    {
        $error = array(
            'number' => $errno,
            'desc' => $errstr,
            'file' => $errfile,
            'line' => $errline,
            'context' => $errcontext,
            'isException' => $isException,
        );
        $handled = false;
        if ($isException) {
            $handled = static::call(get_class($errcontext), $handled);
        }
        if (!$handled) {
            static::$errors[] = $error;
        }
    }
275721
public function _handleMailErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null)
    {
        $this->_errstr = $errstr;
        return true;
    }
77992
public function handleError($errno, $errstr, $errfile, $errline, $errcontext) {
        throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
    }
175397
protected function fail($errcode=-1, $errmsg=null, $data=null)
    {
        return static::error($errcode, $errmsg, $data);
    }
582094
public static function errorHandler($errno, $errstr, $errfile = null, $errline = null, $errcontext = null)
    {
        return true;
    }
526190
static public function errorHandler($errorNumber, $errorString, $errorFile, $errorLine)
    {

        /*
         * Is line has been suppressed with an @, do not throw an exception
         */
        if (error_reporting() == 0) {
            return;
        }

        $errorFullText = self::formatErrorText($errorNumber, $errorString, $errorFile, $errorLine);

        /*
     * Hold execution
     */
        if (self::$errorHoldsExecution) {
            throw new DebugException ($errorFullText, $errorNumber);
        } else {
            /*
     * display error
     */
            if (self::$displayErrors) {
                echo self::displayBox();
            }
            /*
       * Message error
       */
            if (self::$displayTrace) {
                echo self::formatError($errorFullText);
            }

            /*
     * Send message do psHelpdesk
     */
            if (self::$sendTrace) {
                self::send($errorFullText);
            }
        }

    }
314050
public function error($errno, $error, $file, $line) {
        try {
            throw new MyException($error, $errno, $file, $line);
        } catch (MyException $e) {
            ERRORCODE($e);
        }
    }
90001
private function logError($errno, $errstr, $errfile, $errline)
    {
        if (!($errno & $this->loggedErrors)) {
            return false;
        }

        $loggedLevel = isset($this->logLevels[$errno]) ? $this->logLevels[$errno] : 'error';

        $stacktrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        $stacktrace = array_slice($stacktrace, 2);

        array_unshift($stacktrace, [
            'file' => $errfile,
            'line' => $errline,
        ]);

        $this->logger->log($loggedLevel, $errstr, [
            'errorCode' => $errno,
            'errorType' => self::getErrorType($errno),
            'errorFile' => $errfile,
            'errorLine' => $errline,
            'errorStacktrace' => $this->formatStacktrace($stacktrace),
        ]);

        return true;
    }
1283865
private function buildErrorHash($errno, $errfile, $errline, $errstr) {
		return sha1($errno . '-' . $errfile . '-' . $errline . '-' . $errstr);
	}
675688
public function error_handler($errno, $errstr, $errfile, $errline, $errcontext = null)
    {
        // throwing an exception in an error handler will halt execution
        //   set the last error and continue
        $this->last_error = compact('errno', 'errstr', 'errfile', 'errline', 'errcontext');
    }
55588
public function handleError($errNo, $errStr, $errFile, $errLine, $errContext = array(), Metadata $metadata = null)
	{
		if (0 === error_reporting())
		{
			return $this;
		}

		$error    = new ErrorException($errStr, $errNo, $errFile, $errLine, $errContext);
		$metadata = $this->getMetadata($metadata, $error);

		if (false === $this->shouldHandle($metadata))
		{
			return $this;
		}

		$categories = $metadata->getCategories();

		foreach ($this->handlerManager->all($categories) as $handler)
		{
			$handler->handleError($error, $metadata);
		}

		$this->stats->addError();

		return $this;
	}
712458
protected function warningHandler($errno, $errstr, $errfile, $errline)
    {
        /*
        We do NOT do the following (even though it is generally recommended):

        if (!(error_reporting() & $errno)) {
            // This error code is not included in error_reporting, so let it fall
            // through to the standard PHP error handler
            return false;
        }

        - Because we want to log all warnings and errors (also the ones that was suppressed with @)
        https://secure.php.net/manual/en/language.operators.errorcontrol.php
        */

        $errorTypes = [
            E_WARNING =>             "Warning",
            E_NOTICE =>              "Notice",
            E_USER_ERROR =>          "User Error",
            E_USER_WARNING =>        "User Warning",
            E_USER_NOTICE =>         "User Notice",
            E_STRICT =>              "Strict Notice",
            E_DEPRECATED =>          "Deprecated",
            E_USER_DEPRECATED =>     "User Deprecated",

            /*
            The following can never be catched by a custom error handler:
            E_PARSE, E_ERROR, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING

            We do do not currently trigger the following:
            E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE

            But we may want to do that at some point, like this:
            trigger_error('Your version of Gd is very old', E_USER_WARNING);
            */
        ];

        if (isset($errorTypes[$errno])) {
            $errType = $errorTypes[$errno];
        } else {
            $errType = "Unknown error ($errno)";
        }

        $msg = $errType . ': ' . $errstr . ' in ' . $errfile . ', line ' . $errline . ', PHP ' . PHP_VERSION .
            ' (' . PHP_OS . ')';
        $this->logLn($msg);

        /*
        if ($errno == E_USER_ERROR) {
            // trigger error.
            // unfortunately, we can only catch user errors
            throw new ConversionFailedException('Uncaught error in converter', $msg);
        }*/

        //echo 'previously defined handler:' . print_r($this->previousErrorHandler, true);

        return call_user_func($this->previousErrorHandler, $errno, $errstr, $errfile, $errline);
        //return $this->previousErrorHandler;
    }
276454
static public function errorHandler($errno, $errstr, $errfile='', $errline=0, $errcontext=array())
    {
        if (!isset(self::$ignore[basename($errfile) . '-' . $errline . '-' . $errno])) {
            $msg = $errstr . ' Line '
                    . $errline
                    . ', '
                    . $errfile;
            self::$logger->debug($msg);
        }

        return true;
    }
1147819
public function trapXMLError($errno, $errstr, $errfile, $errline)
    {
        $this->__error($errno, str_replace('DOMDocument::', null, $errstr), $errfile, $errline, 'xml');
    }