@param IErrorHandler $handler
@param $number
@param $string
@param $file
@param $line

@return bool|void
485328
public function createRecoverableErrorAndCallHandler(
        IErrorHandler $handler,
        $number,
        $string,
        $file,
        $line
    ) {
        $error = new RecoverableError($number, $string, $file, $line);

        return $handler->handleRecoverableError($error);
    }
791490
public static function error( $num, $message, $file, $line ) 
	{	
		$exception = new CCException( static::$error_types[$num]." - ".$message, 0, $num, $file, $line );
		
		if ( static::is_fatal_level( $num ) ) 
		{
			if ( static::$in_shutdown_process ) 
			{
				static::exception( $exception );
			} else 
			{
				throw $exception;
			}
		} else 
		{
			static::$non_fatals[] = $exception; 
		}
	}
791131
public function addFatalErrorHandler($handler) {
        if ( ! $handler instanceof INativeErrorHandler && ! is_callable($handler)) {
            throw new InvalidHandlerType(
                s('Fatal error handler must be a callable or an instance of %s.',
                    INativeErrorHandler::class)
            );
        }

        if (is_callable($handler)) {
            $handler = $this->createNativeErrorHandler($handler);
        }

        $this->fatalErrorHandlers[] = $handler;
    }
205126
public function throwError($number, $uploaded = false, $exit = true) {
        if ($this->_catchAllErrors || in_array($number, $this->_skipErrorsArray)) {
            return false;
        }

        $oRegistry = & CKFinder_Connector_Core_Factory :: getInstance("Core_Registry");
        $sFileName = $oRegistry->get("FileUpload_fileName");
        $sFileUrl = $oRegistry->get("FileUpload_url");
        $sEncodedFileName = CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($sFileName);

        header('Content-Type: text/html; charset=utf-8');

        $errorMessage = CKFinder_Connector_Utils_Misc::getErrorMessage($number, $sEncodedFileName);
        if (!$uploaded) {
            $sFileName = "";
            $sEncodedFileName = "";
        }
        if (!empty($_GET['response_type']) && $_GET['response_type'] == 'txt') {
            echo $sFileName."|".$errorMessage;
        }
        else {
            echo "<script type=\"text/javascript\">";
            if (!empty($_GET['CKFinderFuncNum'])) {

                if (!$uploaded) {
                    $sFileUrl = "";
                    $sFileName = "";
                }

                $funcNum = preg_replace("/[^0-9]/", "", $_GET['CKFinderFuncNum']);
                echo "window.parent.CKFinder.tools.callFunction($funcNum, '" . str_replace("'", "\\'", $sFileUrl . $sFileName) . "', '" .str_replace("'", "\\'", $errorMessage). "');";
            }
            else {
                echo "window.parent.OnUploadCompleted('" . str_replace("'", "\\'", $sEncodedFileName) . "', '" . str_replace("'", "\\'", $errorMessage) . "') ;";
            }
            echo "</script>";
        }

        if ($exit) {
            exit;
        }
    }
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;
	}
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);
            }
        }

    }
394266
public function warningHandler($errno, $errstr, $errfile, $errline) {
		if ($errno != E_WARNING && $errno != E_USER_WARNING) {
			return false;
		}
		
		$message = "WARNING! [$errno] $errstr. Line $errline in file $errfile. ";
		
		// because some more problems can happen during logging or display
		// better to disable this handler
		$this->setCatchWarnings(false);
		
		$exception = new \Exception($message);

		$this->processError($exception,'warning');		
		
		$this->setCatchWarnings(true);
	}
1125684
private function handleCurlError($error, $errorNumber, $verbose): void
    {
        if (!$error) {
            return;
        }

        $errorMessage = "\ncURL transport error: $errorNumber - $error";

        $transportException = new TransportException($errorMessage);

        rewind($verbose);

        $verboseLog = stream_get_contents($verbose);

        if ($verboseLog !== false) {
            $verboseLog = htmlspecialchars($verboseLog);

            $transportException->setData($verboseLog);
        }

        throw $transportException;
    }
111835
public static function errorHandler($iError, $sMsg, $sFile, $sLine) {
		if (Tango::isStopError($iError)) {
			self::handler(new TangoException($sMsg, 2), FALSE);
		}
		return FALSE;
	}
883535
public function errorHandler(int $type, string $message, string $file, int $line) :void
    {
        $this->whichError($message, $type, $file, $line);
    }
1140337
public function handler($severity, $message, $file, $line)
    {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
189814
public static function renderError($type, $message, $file, $line)
    {
        if (empty(self::$views['error'])) {
            return null;
        } elseif (preg_match('#allowed\s+memory\s+size\s+of\s+\d+\s+bytes\s+exhausted\s+\(tried\s+to\s+allocate\s+\d+\s+bytes\)#i', $message)) {
            die('<br><strong>Fatal error:</strong> ' . $message . ' in <strong>' . $file . '</strong> on line <strong>' . $line . '</strong>');
        }

        $data = self::details($type, $message, $file, $line);

        if (!headers_sent() && strcasecmp(Request::header('accept'), 'application/json') === 0) {
            ob_start();

            self::unregister();

            Response::cache(0);
            Response::type('application/json');

            echo json_encode($data);

            App::stop(500);
        }

        if (in_array($type, self::$fatal)) {
            View::dispatch();
        }

        self::render(self::$views['error'], $data);
    }
786007
public static function errorHandlerCallback($code, $string, $file, $line, $context)
    {
        $e = new self($string, $code);
        $e->line = $line;
        $e->file = $file;
        throw $e;
    }
392790
function(handler) {
      for (var i = 0; i < this.lines_.length; ++i) {
        var line = this.lines_[i];
        handler.apply(this, line);
      }
    }
536516
public static function sendLine($handle, $line) {
        $buffer = self::_parseLine($line);
        return self::_writeToServer($handle, $buffer);
    }
202941
public static function error_handler( $errno, $errstr, $errfile, $errline, $errcontext = null ) {
		// If ignoring E_USER_WARNING | E_USER_NOTICE, default.
		if ( ! ( error_reporting() & $errno ) ) {
			return false;
		}
		// If not in "wp-includes/update.php", default.
		$update_php = 'wp-includes/update.php';
		if ( 0 !== substr_compare( $errfile, $update_php, -strlen( $update_php ) ) ) {
			return false;
		}
		// Else assume it's in `wp_update_themes()` or `wp_update_plugins()` and just ignore it.
		return true;
	}
118244
public function handleError($level, $message, $file = '', $line = 0)
    {
        if (error_reporting() & $level) {
            $error = [
                'message' => $message,
                'file' => $file,
                'line' => $line,
                'type' => $level,
            ];

            switch ($level) {
                case E_USER_ERROR:
                    $this->record($error);
                    if ($this->container->runningInConsole()) {
                        $this->renderForConsole($error);
                    }

                    if (!$this->container->runningInConsole()) {
                        $this->renderHttpResponse($error);
                    }
                    break;
                default:
                    $this->record($error, 'warning');
                    break;
            }
            return true;
        }

        return false;
    }