Ticket #16 (closed enhancement: fixed)

Opened 2 years ago

Last modified 1 month ago

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>

Change History

Changed 2 years ago by dhughes

  • status changed from new to closed
  • resolution set to fixed

(In [293]) Fixes #16. The config object was updated to throw a typed error (reactor.config.InvalidPathToConfig) when the config file does not exist.

Changed 2 years ago by dhughes

  • status changed from closed to reopened
  • resolution deleted

Oops, that last commit had nothing to do with the fix.

Changed 2 years ago by dhughes

  • status changed from reopened to closed
  • resolution set to fixed

(In [294]) Fixes #16. The config object was updated to throw a typed error (reactor.config.InvalidPathToConfig?) when the config file does not exist.

Changed 2 years ago by dhughes

  • milestone changed from Reactor 2.0 Alpha to Beta Candidate 2 (BC2)

Changed 1 month ago by anonymous

  • milestone deleted

Milestone Beta Candidate 2 (BC2) deleted

Note: See TracTickets for help on using tickets.