title: Yii Error Handler does not work while view file is not found
body: <p>I have set up error handler into my Yii site.</p>
  
  <p>Here is the code. </p>
  
  <p><strong>main.php</strong></p>
  
  <pre><code>'errorHandler'=&gt;array(
          // use 'site/error' action to display errors
          'errorAction'=&gt;'site/error',
  ),
  </code></pre>
  
  <p><strong>SiteController.php</strong></p>
  
  <pre><code>public function actionError() {
          if ($error = Yii::app()-&gt;errorHandler-&gt;error) {
              if (Yii::app()-&gt;request-&gt;isAjaxRequest)
                  echo $error['message'];
              else
                  $this-&gt;render('error', $error);
          }
      }
  </code></pre>
  
  <p><strong>site/error.php</strong></p>
  
  <pre><code>&lt;?php
      $this-&gt;pageTitle=Yii::app()-&gt;name . ' - Error';
      $this-&gt;breadcrumbs=array(
          'Error',
      );
  ?&gt;
  
  &lt;h2&gt;Error &lt;?php echo $code; ?&gt;&lt;/h2&gt;
  
  &lt;div class="error"&gt;
      &lt;?php echo CHtml::encode($message); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It is working fine and redirect to this custom error page If URL is wrong or User call wrong function.
  For example, If In site controller I have set <code>contact</code> function and User calls URL like this <code>localhost.com/site/contactsdffe</code> then It redirects to this custom error page.</p>
  
  <p><strong>But the problem is here.</strong></p>
  
  <p>If controller function calls the view contact and I have not set up views/site/contact.php view then It is not called this custom error page.
  It gives me a this exception error.</p>
  
  <blockquote>
    <p>CException : SiteController cannot find the requested view "contact".</p>
  </blockquote>
  
  <p>I don't know why error handler is not working for this scenario and Please let me know that How I can show custom error page for this kind of error.</p>
  
  <p>Any help will appreciate. Thanks in Advance !</p>