class G6KExceptionListener

Custom exception listener

Properties

protected KernelInterface $kernel
protected Environment $twig

Methods

void
__construct(KernelInterface $kernel, Environment $twig)

Constructor of class G6KExceptionListener

void
onKernelException(ExceptionEvent $event)

The listener for the exception event

Response
htmlResponse(Request $request, Exception $exception)

Renders a HTML response with the exception for the simulation engine

Response
htmlAdminResponse(Exception $exception)

Renders a HTML response with the exception for the administration module

Response
jsonResponse(Request $request, Exception $exception)

Renders a JSON response with the exception

string
trace(Exception $e, array $seen = null)

Makes an HTML trace of the exception

Details

at line 47
void __construct(KernelInterface $kernel, Environment $twig)

Constructor of class G6KExceptionListener

Parameters

KernelInterface $kernel The Symfony kernel
Environment $twig The twig environment

Return Value

void

at line 60
void onKernelException(ExceptionEvent $event)

The listener for the exception event

Parameters

ExceptionEvent $event The exception event

Return Value

void

at line 83
protected Response htmlResponse(Request $request, Exception $exception)

Renders a HTML response with the exception for the simulation engine

Parameters

Request $request The request
Exception $exception

Return Value

Response The HTML response

at line 150
protected Response htmlAdminResponse(Exception $exception)

Renders a HTML response with the exception for the administration module

Parameters

Exception $exception

Return Value

Response The HTML response

at line 198
protected Response jsonResponse(Request $request, Exception $exception)

Renders a JSON response with the exception

Parameters

Request $request The request
Exception $exception The exception

Return Value

Response The JSON response

at line 237
protected string trace(Exception $e, array $seen = null)

Makes an HTML trace of the exception

Parameters

Exception $e The exception
array $seen (default: null)

Return Value

string The HTML trace