lib/pears/provider/local_file.rb in pears-0.0.11 vs lib/pears/provider/local_file.rb in pears-0.1.0

- old
+ new

@@ -6,10 +6,11 @@ # Used for loading simple YAML file locally. class LocalFile < Base def initialize(file_path, on_failure: :raise) yaml_data = File.read(file_path) @data = parse_yaml(yaml_data) - rescue Errno::ENOENT => error + rescue Errno::ENOENT, + Pears::InvalidProviderData => error if on_failure == :null @data = {} else raise error end