class BlueScreen

Renders a beautiful error/exception page with syntax-highlighted stack trace.

Constants

private MaxMessageLength

Properties

string[] $info
string[] deprecated $collapsePaths
$maxDepth
$maxLength
$maxItems
$scrubber
string[] $keysToHide
$showEnvironment

Methods

__construct()

No description

addPanel(callable $panel)

Add custom panel.

addAction(callable $action)

Add action.

addFileGenerator(callable $generator)

Add new file generator.

addFiber(Fiber|Generator $fiber)

No description

void
render(Throwable $exception)

Renders blue screen.

string
renderAgent(Throwable $exception, array|null $logLocation = null)

Captures blue screen as plain text (markdown).

void
renderToAjax(Throwable $exception, DeferredContent $defer)

No description

bool
renderToFile(Throwable $exception, string $file, array|null $logLocation = null)

Renders blue screen to file (if file exists, it will not be overwritten).

static string
getExceptionTitle(Throwable $exception)

No description

static string|null
highlightFile(string $file, int $line, int $lines = 15, bool $php = true, int $column = 0)

Returns syntax highlighted snippet from a file, or null if the file cannot be read.

static string
highlightPhp(string $source, int $line, int $lines = 15, int $column = 0)

Returns syntax highlighted PHP source code with the given line emphasized.

static string
highlightLine(string $html, int $line, int $lines = 15, int $column = 0)

Returns highlighted line in already-tokenized HTML code.

bool
isCollapsed(string $file) deprecated

Should a file be collapsed in stack trace?

array
prepareStack(Throwable $ex)

Returns the exception's stack trace with Tracy-internal handler frames stripped, together with the index of the frame that should be expanded by default (or null).

getDumper()

No description

getAgentDumper()

No description

string
formatMessage(Throwable $exception)

No description

Details

at line 61
__construct()

No description

at line 72
BlueScreen addPanel(callable $panel)

Add custom panel.

Parameters

callable $panel

Return Value

BlueScreen

at line 87
BlueScreen addAction(callable $action)

Add action.

Parameters

callable $action

Return Value

BlueScreen

at line 98
BlueScreen addFileGenerator(callable $generator)

Add new file generator.

Parameters

callable $generator

Return Value

BlueScreen

at line 105
BlueScreen addFiber(Fiber|Generator $fiber)

No description

Parameters

Fiber|Generator $fiber

Return Value

BlueScreen

at line 115
void render(Throwable $exception)

Renders blue screen.

Parameters

Throwable $exception

Return Value

void

at line 129
string renderAgent(Throwable $exception, array|null $logLocation = null)

Captures blue screen as plain text (markdown).

Parameters

Throwable $exception
array|null $logLocation

Return Value

string

at line 136
void renderToAjax(Throwable $exception, DeferredContent $defer)

internal  
 

No description

Parameters

Throwable $exception
DeferredContent $defer

Return Value

void

at line 149
bool renderToFile(Throwable $exception, string $file, array|null $logLocation = null)

Renders blue screen to file (if file exists, it will not be overwritten).

Parameters

Throwable $exception
string $file
array|null $logLocation

Return Value

bool

at line 345
static string getExceptionTitle(Throwable $exception)

internal  
 

No description

Parameters

Throwable $exception

Return Value

string

at line 356
static string|null highlightFile(string $file, int $line, int $lines = 15, bool $php = true, int $column = 0)

Returns syntax highlighted snippet from a file, or null if the file cannot be read.

Parameters

string $file
int $line
int $lines
bool $php
int $column

Return Value

string|null

at line 384
static string highlightPhp(string $source, int $line, int $lines = 15, int $column = 0)

Returns syntax highlighted PHP source code with the given line emphasized.

Parameters

string $source
int $line
int $lines
int $column

Return Value

string

at line 393
static string highlightLine(string $html, int $line, int $lines = 15, int $column = 0)

Returns highlighted line in already-tokenized HTML code.

Parameters

string $html
int $line
int $lines
int $column

Return Value

string

at line 404
bool isCollapsed(string $file) deprecated

deprecated use Helpers::countTransparentFrames()

internal  
 

Should a file be collapsed in stack trace?

Parameters

string $file

Return Value

bool

at line 417
array prepareStack(Throwable $ex)

internal  
 

Returns the exception's stack trace with Tracy-internal handler frames stripped, together with the index of the frame that should be expanded by default (or null).

Strips top frames belonging to DevelopmentStrategy/ProductionStrategy and Debugger error/shutdown handlers.

Parameters

Throwable $ex

Return Value

array

at line 444
Closure getDumper()

internal  
 

No description

Return Value

Closure

at line 459
Closure getAgentDumper()

No description

Return Value

Closure

at line 469
string formatMessage(Throwable $exception)

No description

Parameters

Throwable $exception

Return Value

string