public function setPHPError($code, $message, $file, $line, $fatal = false)
    {
        if ($fatal) {
            // Generating stacktrace for PHP fatal errors is not possible,
            // since this code executes when the PHP process shuts down,
            // rather than at the time of the crash.
            //
            // In these situations, we generate a "stacktrace" containing only
            // the line and file number where the crash occurred.
            $stacktrace = Stacktrace::fromFrame($this->config, $file, $line);
        } else {
            $stacktrace = Stacktrace::generate($this->config);
        }

        $this->setName(ErrorTypes::getName($code))
             ->setMessage($message)
             ->setSeverity(ErrorTypes::getSeverity($code))
             ->setStacktrace($stacktrace);

        return $this;
    }
public function setPHPError($code, $message, $file, $line, $fatal = false)
    {
        if ($fatal) {
            // Generating stacktrace for PHP fatal errors is not possible,
            // since this code executes when the PHP process shuts down,
            // rather than at the time of the crash.
            //
            // In these situations, we generate a "stacktrace" containing only
            // the line and file number where the crash occurred.
            $stacktrace = Stacktrace::fromFrame($this->config, $file, $line);
        } else {
            $stacktrace = Stacktrace::generate($this->config);
        }

        $this->setName(ErrorTypes::getName($code))
             ->setMessage($message)
             ->setSeverity(ErrorTypes::getSeverity($code))
             ->setStacktrace($stacktrace);

        return $this;
    }
public function setPHPError ( $ code , $ message , $ file , $ line , $ fatal = false ) { if ( $ fatal ) { // Generating stacktrace for PHP fatal errors is not possible, // since this code executes when the PHP process shuts down, // rather than at the time of the crash. // // In these situations, we generate a "stacktrace" containing only // the line and file number where the crash occurred. $ stacktrace = Stacktrace :: fromFrame ( $ this -> config , $ file , $ line ) ; } else { $ stacktrace = Stacktrace :: generate ( $ this -> config ) ; } $ this -> setName ( ErrorTypes :: getName ( $ code ) ) -> setMessage ( $ message ) -> setSeverity ( ErrorTypes :: getSeverity ( $ code ) ) -> setStacktrace ( $ stacktrace ) ; return $ this ; }
Set the PHP error.

@param int         $code    the error code
@param string|null $message the error message
@param string      $file    the error file
@param int         $line    the error line
@param bool        $fatal   if the error was fatal

@return $this
Set the PHP error .