lib/power_stencil/project/config.rb in power_stencil-0.4.22 vs lib/power_stencil/project/config.rb in power_stencil-0.5.0

- old
+ new

@@ -27,11 +27,11 @@ PLUGIN_CONFIG_PRIORITY_MIN else plugin_priority_count + 1 end raise PowerStencil::Error, 'Too many plugins !!' if priority >= PROJECT_CONFIG_PRIORITY - add_optional_config_layer yaml_file, "'#{plugin_name}' plugin specific config", priority + raise PowerStencil::Error, "Invalid config for plugin '#{plugin_name}'" unless add_optional_config_layer yaml_file, "'#{plugin_name}' plugin specific config", priority @plugin_priority_count ||= 0 @plugin_priority_count += 1 end private @@ -44,11 +44,11 @@ new_config_layer.name = layer_name new_config_layer.priority = layer_priority config << new_config_layer new_config_layer rescue => e - logger.error "The #{layer_name} '#{yaml_file}' is invalid and has been ignored !" logger.debug PowerStencil::Error.report_error(e) + logger.error "The #{layer_name} '#{yaml_file}' is invalid and has been ignored !" false end else logger.debug "No #{layer_name} found." false