class ExceptionViewer (View source)

Class ExceptionViewer

Methods

__construct()

ExceptionViewer constructor.

int
getHttpStatusCode(Exception $exception)

No description

string
getHumanExceptionTitle(Exception $e)

No description

string
getJsonError(Exception $e)

No description

JsonResponse|Response
getResponse(Exception $e, Request $request, bool $debug = false)

No description

bool
isFormatJson(Request $request)

No description

string
getColoredString($string, null $foreground_color = null, null $background_color = null)

No description

array
getForegroundColors()

No description

array
getBackgroundColors()

No description

Details

__construct()

ExceptionViewer constructor.

int getHttpStatusCode(Exception $exception)

Parameters

Exception $exception

Return Value

int

string getHumanExceptionTitle(Exception $e)

Parameters

Exception $e

Return Value

string

string getJsonError(Exception $e)

Parameters

Exception $e

Return Value

string

JsonResponse|Response getResponse(Exception $e, Request $request, bool $debug = false)

Parameters

Exception $e
Request $request
bool $debug

Return Value

JsonResponse|Response

bool isFormatJson(Request $request)

Parameters

Request $request

Return Value

bool

string getColoredString($string, null $foreground_color = null, null $background_color = null)

Parameters

$string
null $foreground_color
null $background_color

Return Value

string

array getForegroundColors()

Return Value

array Returns all foreground color names

array getBackgroundColors()

Return Value

array Returns all background color names