Throws a lexer-exception.

The current line and offset of the exception
get automatically appended to the message

@param string $message A meaningful error message

@throws Exception
11680
protected function throwException($message)
    {

        $near = $this->isAtEnd() ? 'END' : $this->peek(10);
        $message = "Failed to lex jade: $message (Line: {$this->line}, Offset: {$this->offset}, Near: `$near`)";
        throw new Exception($message);
    }
1092337
private function _throwDispatchException( $message, $exception_code = 0 )
    {
        $exception = new \Exception( $message, $exception_code );

		if ( is_object($this->_events_manager) )
        {
            /**
             * If the event returns false -> exit and don't throw exception
             */
            if ( $this->_events_manager->fire( "dispatch:beforeException", $this, array("exception" => $exception) ) == false )
            {
                return false;
            }
		}

        throw $exception;
    }
754165
public void error(final String message, final Exception exception) {
        messages.add(new LogMessage(message + " " + exception.getMessage(), LogMessage.Type.ERROR));
        log.error(message, exception);
    }
1367224
protected static function outputCliError($message)
    {
        $application = new ConsoleApp();
        $output = new ConsoleOutput();
        $application->renderException(new ResponseException($message), $output);
    }
600471
public function throwError($msg = null) {
if ($this->sourceLoc >= 0) {
$this->sourceParser->throwError($msg, $this->sourceLoc);
}
throw new \Exception($msg);
}
222972
protected function appendMessage(string $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > $this->config['max_messages']) {
            array_shift($this->messages);
        }
    }
108713
public function addErrorMessage(string $message) : self
    {
        if ($this->throw_errors == true) {
            throw new \RuntimeException($message);
        }

        $this->errors_messages[] = $message;
        return $this;
    }
298746
private function _decodeBinanceException($message)
    {
        $msg = json_decode($message, true);
        $this->code = isset($msg['code']) ? $msg['code'] : 0;
        $this->message = isset($msg['msg']) ? $msg['msg'] : '';
    }
645223
public function violate($message)
    {
        if (!empty($this->messages)){
            $message = $this->messages[0];
        } else {
            $this->setMessage($message);
        }
    }
1205450
public function dispatchException($exception) {
		if($this->isActive()) {
			if($this->dispatchPreviousExceptions && $exception->getPrevious()) {
				$this->dispatchException($exception->getPrevious());
			}
			$message = new ErrorMessage();
			$message->code = $exception->getCode();
			$message->class = get_class($exception);
			$message->data = $this->dumper->dump($exception->getMessage());
			$message->file = $exception->getFile();
			$message->line = $exception->getLine();
			$message->trace = self::fetchTrace($exception->getTrace(), $message->file, $message->line);
			$this->sendMessage($message);
		}
	}
815175
private function parseRawMessage($message) {
		$positionStartBody = strpos($message, "\r\n\r\n");

		$startPositionOffset = 4;
		if ($positionStartBody === false) {
			$positionStartBody = strpos($message, "\n\n");
			$startPositionOffset = 2;
			if ($positionStartBody === false) {
				throw new \Exception("Invalid HTTP message provided. It does not contain a header part.");
			}
		}

		$headerString = str_replace("\r\n", "\n", trim(substr($message, 0, $positionStartBody), "\r\n"));
		$content = substr($message, $positionStartBody + $startPositionOffset);

		$this->headers = $this->parseHttpHeaders($headerString);
		$statusLine = current(explode("\n", $headerString));
		$this->parseStatusLine($statusLine);
		$this->body = $content;
	}
1334539
private static function addError($message): void
    {
        if (self::$result === false) {
            self::$result = array();
        }
        self::$result[] = $message;
    }
573095
protected function _error($message) {
		if (count($this->_errors) >= 200) {
			array_shift($this->_errors);
		}
		array_push($this->_errors, $message);
	}
1066346
private function triggerError($message) {
        $pdo = $this->pdoSupplier->getPDO();
        $mode = $pdo->getAttribute(\PDO::ATTR_ERRMODE);
        switch ($mode) {
            case \PDO::ERRMODE_WARNING:
                trigger_error($message, E_USER_ERROR);
                break;
            case \PDO::ERRMODE_EXCEPTION:
                throw new \RuntimeException($message);
                break;
            case \PDO::ERRMODE_SILENT:
            default:
                break;
        }
    }
1080415
public function hasExceptionOfMessage($message)
    {
        foreach ($this->_exceptions as $e) {
            if ($message == $e->getMessage()) {
                return true;
            }
        }

        return false;
    }
357968
public function exceptionHandler($message)
    {
        $errorCode = $message->getCode()?: 404;

        if($this->customErrorViewExist($errorCode)) {
            $this->response->send(
                view("errors.{$errorCode}")
            );
        }

        error_log("planet.ERROR ".$message->getMessage() . "\nStack trace:\n" . $message->getTraceAsString());

        if(php_sapi_name() == 'cli') {
            (new ConsoleApplication)->renderException($message, new ConsoleOutput);
        } else {
            $debugMode = filter_var($this->app->config->getApp('debug'), FILTER_VALIDATE_BOOLEAN);

            $exceptionHandler = new ExceptionHandler($debugMode);

            $exceptionHandler->sendPhpResponse($message);
        }
    }
186316
private function throwException($message,array $stackTrace , $error = true )
    {
        $this->exception($message,$stackTrace,$error);
    }