check for error

I have my own AppCotroller and using the beforeRender method to make changes to $this->viewPath based on the desired output format.

Is there a way I can check if Cake is currently outputting an error message? If I change the viewPath and then it's displaying an error (like can't load model, etc) it will error on the error :)