Stats
Version
0.1
Wheels Compatibility
1.0
Downloads
59
Last Updated
December 27, 2009
About Plugins
Plugins allow you to extend or modify default Wheels application behavior. To use, you just drop the zip file into your plugins directory and reload your application.
Read Using and Creating Plugins for more information.
Exception Render
A plugin to reuse the wheels framework to render exception messages.
Author
Project Home
http://iamjamesgibson.com/code
Description
This plugin adds a new method that can be used in "/events/onerror.cfm", "/events/onmaintenance" and "/events/onmissingmethod.cfm" to reuse the wheels framework to render exception pages. The methods include:
exceptionRender(route, controller, action, key, params)
Call this method from from the files listed above to reuse 100% of your existing code. This plugin has a couple of benefits which include:
- Response codes 404 and 500 are preserved.
- 100% reuse of your existing layouts and templates. No need to duplicate your layouts in onerror.cfm and onmissingtemplate.cfm
- Coldfusion still catches errors that occur in onerror() and onMissingMethod() so you application will never hang from errors created inside of the error trapping system.
If you have a complex application this can save you time since you would no longer need to duplicate layouts, templates, etc.
Uninstallation
To uninstall this plugin simply delete the /plugins/ExceptionRender-0.1.zip file.
Credits
This plugin was created by James Gibson.
Usage/Examples
Just put the one of the code samples below into the files listed at the top to render error pages.
<cfoutput>
#exceptionRender(route="yourExceptionRoute", action="yourExceptionAction")#
</cfoutput>
- or -
Just put the one of the code samples below into the files listed at the top to render error pages.
<cfscript>
#WriteOutput(exceptionRender(route="yourExceptionRoute", action="yourExceptionAction"))#
</cfscript>
