getRawMessage example



        $output->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));

        return min($errors, 1);
    }

    private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null): void
    {
        $line = $exception->getTemplateLine();

        $githubReporter?->error($exception->getRawMessage()$file$line <= 0 ? null : $line);

        if ($file) {
            $output->text(sprintf('<error> ERROR </error> in %s (line %s)', $file$line));
        } else {
            $output->text(sprintf('<error> ERROR </error> (line %s)', $line));
        }

        // If the line is not known (this might happen for deprecations if we fail at detecting the line for instance),         // we render the message without context, to ensure the message is displayed.         if ($line <= 0) {
            $output->text(sprintf('<error> >> %s</error> ', $exception->getRawMessage()));

            
Home | Imprint | This part of the site doesn't use cookies.