title: CakePHP error handling
body: <p>I am using cakephp, I working on Error Handling</p>
  
  <p>I have follow <a href="http://book.cakephp.org/1.3/en/view/1188/Error-Handling" rel="nofollow">http://book.cakephp.org/1.3/en/view/1188/Error-Handling</a></p>
  
  <p>I have create AppError My code is</p>
  
  <p>app/app_error.php</p>
  
  <pre><code>&lt;?php
  
      class AppError extends ErrorHandler {
  
  
          function error404() {
              //$this-&gt;controller-&gt;set('file', $params['file']);
              $this-&gt;_outputMessage('error404');
          }
  
      }
      ?&gt;
  </code></pre>
  
  <p>I am calling this error404 from my controller</p>
  
  <pre><code>function userprofile($id = null) {
          $user = $this-&gt;Session-&gt;read('user');
          if($id != $user['User']['id'])
          {
              $this-&gt;cakeError('error404');
          }
  }
  </code></pre>
  
  <p>but I found Erro 
  Fatal error: Call to undefined method UsersController::cakeError() in D:\wamp\www\survey\app\Controller\UsersController.php on line 318</p>
  
  <p>I miss some thing?</p>