@param int    $code
@param string $message
@param string $file
@param int    $line

@throws \ErrorException
763554
public static function errorToException($code, $message, $file, $line)
    {
        if (error_reporting() & $code) {
            throw new \ErrorException($message, 0, $code, $file, $line);
        }
    }
358781
public function error($code, $msg, $file, $line)
    {
        $type = $this->getErrorType($code);

        $this->setParams($type, $code, $msg, $file, $line, '', 0);

        return $this->render();
    }
686729
protected function onConnectionError($message, $code = null)
    {
        CommunicationException::handle(
            new ConnectionException($this, static::createExceptionMessage($message), $code)
        );
    }
224791
public function convert($code, $message, $file, $line, $backtrace)
    {
        switch ($code) {
            case E_NOTICE:
            case E_USER_NOTICE:
                $exception = new Notice($message, $line, $file, $backtrace);
                break;
            case E_WARNING:
            case E_USER_WARNING:
                $exception = new Warning($message, $line, $file, $backtrace);
                break;
            case E_RECOVERABLE_ERROR:
            case E_ERROR:
            case E_CORE_ERROR:
                $exception = new Fatal($message, $line, $file, $backtrace);
                break;
            case E_USER_ERROR:
            default:
                $exception = new Error($message, $line, $file, $backtrace);
        }
        return $exception;
    }
1125835
public function setError(int $type, string $message, string $file, int $line, string $class, array $trace = [])  : array
    {
        return $this->errors = [
            'type'    => $type,
            'message' => $message,
            'file'    => $file,
            'line'    => $line,
            'class'   => $class,
            'trace'   => $trace,
        ];
    }
1355105
public function sendError($code, $message = null)
    {
        if ($this->ajaxOnly === false) {
            output()->setContentType('application/json');
        }

        if (is_array($code)) {
            if (is_numeric(key($code))) {
                $message = reset($code);
                $code = key($code);
            } elseif (isset($code[ 'code' ])) {
                $code = $code[ 'code' ];
                $message = $code[ 'message' ];
            }
        }

        output()->sendError($code, $message);
    }
723934
public function errorHandler($code, $message, $file = '', $line = '')
    {
        if ($this->error_to_exception) {

            if (ob_get_length() > 0) {
                ob_end_clean(); // Fix templates
            }

            throw new Exception($message);
        }

        $error = array(
            'code' => $code,
            'file' => $file,
            'line' => $line,
            'message' => $message,
            'backtrace' => $this->log_backtrace ? gplcart_backtrace() : array()
        );

        $print = $this->print_error || !$this->isDb();

        if (in_array($code, $this->getFatalErrorTypes())) {

            if ($print) {
                return false; // Let it fall through to the standard PHP error handler
            }

            $this->log('php_shutdown', $error, 'danger', false);
            return true;
        }

        $key = md5(json_encode($error));

        if (isset($this->errors[$key])) {
            return true;
        }

        $this->errors[$key] = $error;

        if ($print) {
            echo $this->getFormattedError($error);
        }

        $this->log('php_error', $error, 'warning', false);
        return true;
    }
1222189
public function writeError($line, $check, $message, $level = WARNING) {
		$errEl = $this->document->createElement("error");
		$errEl->setAttribute("line", $line);
		$errEl->setAttribute("column", "1");
		$errEl->setAttribute("severity", $level);
		$errEl->setAttribute("message", $message);
		$errEl->setAttribute("source", $check);

		if (empty($this->currentElement)) {
			$this->startNewElement("");
		}
		$this->currentElement->appendChild($errEl);
	}
773150
public function errorHandler($type, $message, $file, $line)
    {
        $this->log(
        	'ErrorHandler: '
            . implode(' ', array($type, $message, $file, $line))
        );
    }
245875
public function handle($code, $error, $file = null, $line = null) : void
    {
        $this->honeybadger->notify(
            new ErrorException($error, $code, 0, $file, $line)
        );

        call_user_func($this->previousHandler, $code, $error, $file, $line);
    }
223403
public function onError($code, $message, $file, $line)
    {
        $exception = $this->converter->convert($code, $message, $file, $line, debug_backtrace());
        $this->errbit->notify($exception);
    }
28730
public function setError($message, $code, $exception = null) {

        $trace = null;
        $extra = "";

        if ($this->get('debug', 0)) {
            if (isset($exception)) {
                $trace = $exception->getTrace();
                $extra = str_replace(JPATH_ROOT, "", $exception->getFile()) . ":" . $exception->getLine();
            } else {
                $trace = array_slice(debug_backtrace(), 2);
            }
        }

        $this->error = array(
            'message'   => $message,
            'code'      => $code,
            'backtrace' => $trace,
            'extra'     => $extra
        );
    }
924315
public function handleError($number, $message, $file, $line, array $context)
    {
        // This avoids silenced (@'ed) errors from being reported.
        if (error_reporting()) {
            $message = "PHP error $number: $message\n\tat $file:$line";
            Logger::get()->error($message);
            $this->handleException(new \RuntimeException($message));
        }
    }
626181
public function error($errorNumber, $message, $file, $line, $context) {
        $errorReporting = error_reporting();
        $errorEnabled = (bool)($errorReporting & $errorNumber);

        // Ignore errors that are below the current error reporting level.
        if (!$errorEnabled) {
            return false;
        }

        $backtrace = debug_backtrace();
        throw new ErrorException($message, $errorNumber, $file, $line, $context, $backtrace);
    }
194863
public function writeError($line, $check, $message, $level = WARNING) {

		// Update the counters
		$this->nbErrors ++;
		$this->fileErrors ++;
		if ($this->fileInError === false) {
			$this->nbfilesError ++;
			$this->fileInError = true;
		}

		// Add the check to the details
		$detail = $this->_readTemplate("detail_body");
		$values = array();
		$values['%%message%%'] = htmlspecialchars($message);
		$values['%%check%%'] = $check;
		$values['%%line%%'] = $line;
		$values['%%level%%'] = $level;
		$detail = $this->_fillTemplate($detail, $values);
		$this->fileDetail .= $detail;
	}
30563
protected function trigger_error( $code, $message, $type = E_USER_NOTICE ){
		$trace = debug_backtrace();
		$Err = PLUG::raise_error( $code, $message, $type, $trace );
		$this->on_trigger_error( $Err );
	}
1272711
public static function errorHandler($code, $message, $file, $line)
    {

        if (error_reporting() === 0) {
            // This error code is not included in error_reporting
            return false;
        }
        throw new \sb\Exception($code, $message, $file, $line);
    }