Add config path to error message

This commit is contained in:
bcoles
2013-12-30 05:27:27 +10:30
parent d17d1357c6
commit c9f0b73100

View File

@@ -22,7 +22,7 @@ module BeEF
# @param [String] configuration_file Configuration file to be loaded, by default loads $root_dir/config.yaml
def initialize(config)
raise Exception::TypeError, '"config" needs to be a string' if not config.string?
raise Exception::TypeError, 'Configuration yaml cannot be found' if not File.exist?(config)
raise Exception::TypeError, "Configuration file '#{config}' cannot be found" if not File.exist?(config)
begin
#open base config
@config = self.load(config)