Javascript error handler for Yii2

0.4.1 2020-07-15 11:32 UTC

This package is auto-updated.

Last update: 2024-05-06 16:44:36 UTC


Javascript error handler for Yii2


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.


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