CException
Description
Property "CWebApplication.appAuthManager" is not defined.
Source File
/usr/local/source/yii/framework/base/CModule.php(93)
00081: /**
00082: * Getter magic method.
00083: * This method is overridden to support accessing application components
00084: * like reading module properties.
00085: * @param string application component or property name
00086: * @return mixed the named property value
00087: */
I’m not sure what are you trying to do exactly… if you just want to show detailed error message in your error handler then you can use variables passed to it… from the definitive guide you linked:
I added the errorHandler component to my application but it is just handling php errors not exceptions like - CDbExceptions, CHttpExceptions etc. For exceptions I am getting regular Yii page showed above.
Here what I would like to do is if exception occurs, it should be displayed to the end user in my application user interface not all stack trace with sensitive information. Also I want to customize how the exception should be displayed to the end user.
sorry, I do not actually know how to do that, nover did try.
As I can see from the definitive guid to yii, you just provide your own error handler and there you can control the variables that will be outputed.
That said, I think you absolutely should give a stact trace and such thing, they are very helpufull when debugging and if you don’t your users wont be able to reprt a solid bug.
Check the files in framework/views (exception.php and error*.php). These are all exception views used by Yii. Exceptions can be thrown from many different components. So there’s no full list of all possible exceptions.
If I create exception.php in my system/views it will render that file instead of default Yii exception layout, thats good! Here yii treats exception.php as a layout file and displays just this file contents.
Is it possible to use this like action, so that I can use my application view layout and content of exception.php should be put into layout like other actions ( like in var $content in app layout).
You can provide your own ErrorHandler class. Check the source of framework/base/CErrorHandler.php for the default implementation. If you extend that class you can configure your custom handler as errorHandler application component.
I suggest to study the source code of CErrorHandler to find out, which methods you need to override. From it’s render() method you see, that errorAction is only used for non-exception errors.