BoxLang 🚀 A New JVM Dynamic Language Learn More...
This module includes the Error handler used by PGA Apps.
This module has built in tests, and a CI that will run tests, and if the tests pass, publish the module to S3 and Forgebox through Circle CI.
Since this module will be used outside of ColdBox, you need to install another module... to ensure the error module needs to know where the Utils is installed. With ColdBox, this would not be needed.
This module can be installed using 2 simple commandbox commands:
box install cfml-module-utils-pgahq
box install cfml-module-error-pga
This will install the module and use the box.json to track the dependencies.
These module is installed into /error
. CFCs can be used via the path error.models.logger
Using CFConfig, you can set the following settings to use for error handling
"generalErrorTemplate":"/error/error.cfm",
"missingErrorTemplate":"/error/notfound.cfm",
You can include the error handler in a try catch with
<cfinclude template="/error/error.cfm">
Tests are located in the /tests
folder.
Tests can be run by hitting /tests/runner.cfm
Please ensure your apps are setup to ignore the error and modules folder.
$
box install cfml-module-error-pga