preaction / Beam-Wire

A simple configuration and dependency injection container
Other
11 stars 10 forks source link

Throw error if config file does not exist #38

Closed preaction closed 9 years ago

preaction commented 9 years ago

Right now, if the config file does not exist, I get this error:

isa check for "config" failed: undef is not a HashRef! at (eval 656) line 30.
        Beam::Wire::config(Beam::Wire=HASH(0x7f891da3d408)) called at /Users/doug/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/Beam/Wire.pm line 348
        Beam::Wire::BUILD(Beam::Wire=HASH(0x7f891da3d408), HASH(0x7f891d34b0d0)) called at (eval 655) line 117
        Beam::Wire::new("Beam::Wire", "file", "site.yml") called at lib/Statocles/Command.pm line 43
        Statocles::Command::main("Statocles::Command", "blog", "post", "Release", "v0.030") called at bin/statocles line 16

There should be a different error message saying exactly that the config file does not exist.