class ErrorReport (View source)

Error reporting functions used to generate and submit error reports

Methods

__construct(HttpRequest $httpRequest, Relation $relation, Template $template, Config $config)

No description

void
setSubmissionUrl(string $submissionUrl)

Set the URL where to submit reports to

array
getData(string $exceptionType = 'js')

Returns the error report data collected from the current configuration or from the request parameters sent by the error reporting js code.

string|bool|null
send(array $report)

Sends report data to the error reporting server

string
getForm()

Generates the error report form to collect user description and preview the report before being sent

string
getEmptyModal()

No description

Details

__construct(HttpRequest $httpRequest, Relation $relation, Template $template, Config $config)

No description

Parameters

HttpRequest $httpRequest
Relation $relation
Template $template
Config $config

void setSubmissionUrl(string $submissionUrl)

Set the URL where to submit reports to

Parameters

string $submissionUrl

Submission URL

Return Value

void

array getData(string $exceptionType = 'js')

Returns the error report data collected from the current configuration or from the request parameters sent by the error reporting js code.

Parameters

string $exceptionType

whether exception is 'js' or 'php'

Return Value

array

error report if success, Empty Array otherwise

string|bool|null send(array $report)

Sends report data to the error reporting server

Parameters

array $report

the report info to be sent

Return Value

string|bool|null

the reply of the server

string getForm()

Generates the error report form to collect user description and preview the report before being sent

Return Value

string

the form

string getEmptyModal()

No description

Return Value

string