Ticket #16 (closed enhancement: fixed)
Add a typed error when the reactor.xml file specified doesn't exist
| Reported by: | joe.rinehart@… | Owned by: | dhughes |
|---|---|---|---|
| Type: | enhancement | Priority: | normal |
| Milestone: | Component: | Reactor Samples - Reactor Blog | |
| Version: | 1.0 | Severity: | normal |
| Keywords: | Cc: |
Description
When you init() config.cfc with an invalid pathToConfigXML, you get a CFFILE error if the file doesn't exist. When loading through ColdSpring, this leads to the generic CFFILE error being the error detail (Attribute validation error for CFFILE) and the type being a CS-specific type that simply states that a bean's init() method failed.
The error message changes on BlueDragon and Railo, so it'd be easier to trap this if the message was Reactor-specific (and unchanging).
Adding this code to source:trunk/reactor/config/config.cfc after the <!--- attempt to expand the path to config ---> block would do the trick:
<cfif not FileExists(arguments.pathToConfigXml)>
<cfthrow message="reactor.config.config.init.invalidPathToConfigXml"
type="reactor.config.config.init.invalidPathToConfigXml" />
</cfif>

