title: How to use Yii2 Queue::EVENT_AFTER_ERROR event
body: <p>I'm using Yii2 Queue extension.</p>
  
  <p>I want to add error handler after triggering error event in job.</p>
  
  <p>This is my model:</p>
  
  <pre><code>namespace app\models;
  
  use Yii;
  use yii\base\BaseObject;
  use yii\queue\JobInterface;
  use yii\queue\Queue;
  
  class AddTransaction extends BaseObject implements JobInterface
  {
      public function execute($queue)
      {
          $test = new League();
          $test-&gt;title_fa = 'تست';
          $test-&gt;title_en = 'test';
          $test-&gt;status = 1;
          $test-&gt;country_id = 3;
          $test-&gt;created = time();
          $test-&gt;save();
      }
  }
  </code></pre>
  
  <p>This is my action:</p>
  
  <pre><code>public function actionTest()
  {
      if (Yii::$app-&gt;queue-&gt;delay(5)-&gt;push(new AddTransaction())) {
          echo "ok";
      } else {
          echo "error";
      }
  }
  </code></pre>
  
  <p>Where use this code?</p>
  
  <pre><code>Yii::$app-&gt;queue-&gt;on(Queue::EVENT_AFTER_ERROR, function (ErrorEvent $event) {
       if ($event-&gt;job instanceof SomeJob) {
           $event-&gt;retry = ($event-&gt;attempt &lt; 5) &amp;&amp; ($event-&gt;error instanceof TemporaryException);
       }
  });
  </code></pre>