X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/knuckleswtf/scribe/src/Tools
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
knuckleswtf
/
scribe
/
src
/
Tools
/
📁
..
📄
AnnotationParser.php
(1.09 KB)
📄
ConsoleOutputUtils.php
(1.79 KB)
📄
DocumentationConfig.php
(300 B)
📄
ErrorHandlingUtils.php
(1.48 KB)
📄
Flags.php
(101 B)
📄
Utils.php
(3.44 KB)
📄
WritingUtils.php
(5.51 KB)
Editing: ErrorHandlingUtils.php
<?php namespace Knuckles\Scribe\Tools; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Output\OutputInterface; class ErrorHandlingUtils { public static function dumpExceptionIfVerbose(\Throwable $e): void { if (Flags::$shouldBeVerbose) { self::dumpException($e); } else { [$firstFrame, $secondFrame] = $e->getTrace(); try { ['file' => $file, 'line' => $line] = $firstFrame; } catch (\Exception $_) { ['file' => $file, 'line' => $line] = $secondFrame; } $exceptionType = get_class($e); $message = $e->getMessage(); $message = "$exceptionType in $file at line $line: $message"; ConsoleOutputUtils::warn($message); ConsoleOutputUtils::warn('Run again with --verbose for a full stacktrace'); } } public static function dumpException(\Throwable $e): void { $output = new ConsoleOutput(OutputInterface::VERBOSITY_VERBOSE); try { $handler = new \NunoMaduro\Collision\Handler(new \NunoMaduro\Collision\Writer(null, $output)); } catch (\Exception $e) { // Version 3 used a different API $handler = new \NunoMaduro\Collision\Handler(new \NunoMaduro\Collision\Writer($output)); } $handler->setInspector(new \Whoops\Exception\Inspector($e)); $handler->setException($e); $handler->handle(); } }
Upload File
Create Folder