execut/yii2-javascript-handler

Javascript error handler for Yii2

Maintainers

👁 execut

Package info

github.com/execut/yii2-javascript-handler

Type:yii2-extension

pkg:composer/execut/yii2-javascript-handler

Statistics

Installs: 200

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.4.1 2020-07-15 11:32 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Apache-2.0 a8ee9ce69ce913e21ec7feeb2d4af293c83f1d52

  • eXeCUT

yii2

This package is auto-updated.

Last update: 2026-06-06 21:38:57 UTC


README

Javascript error handler for Yii2

Install

Either run

$ php composer.phar require execut/yii2-javascript-handler "dev-master"

or add

"execut/yii2-javascript-handler": "dev-master"

to the require section of your composer.json file.

Configuration

Add module inside web application config:

return [
 'modules' => [
 'javascriptHandler' => [
 'class' => Module::class,
 ]
 ],
];

Render widget inside your application layout:

echo \execut\javascriptHandler\JavascriptHandlerWidget::widget([
 'clientOptions' => [
 'test' => true,// delete this line for stopping sending a test exception
 ],
]);

As a result, all javascript exceptions will throw php exceptions, that will be handled via yii2 error handler