title: YII2 errors to be shown inside the 'layout' of where it has been raised?
body: <p>It's common to have separate layouts in multi-tier applications.
  Suppose that there are 'admin', 'forum' and 'site' tier or modules and each one has its own layout in views.</p>
  
  <p>The worst thing about YII error handling is that it's not possible to change the <code>layout</code> file for error handler based on application tier or module.</p>
  
  <p>In YIIs global configuration file we enable <code>errorHandler</code> module as following:</p>
  
  <pre><code>'errorHandler' =&gt; [
              'errorAction' =&gt; 'site/error',
          ],
  </code></pre>
  
  <p>we define an error handler action globally for the whole application and there is no option the change it during app runtime. Even inside that errorAction there is no option to change the <code>layout</code> file or the view file outside its scope.</p>
  
  <p>What solution could be possible and enough straightforward to have each error to be shown inside the <code>layout</code> of where it has been raised? </p>