Skip to content

Commit

Permalink
reference properly-namespaced ConfigurationError when failing
Browse files Browse the repository at this point in the history
Previous code was failing to resolve ConfigurationError at runtime,
because there is no ConfigurationError on the lexical scope or included
into the LSCL AST.

Instead of emitting the helpful error intended, it blew up with a
NameError that adds noise to the problem instead of being helpful as
intended.

Fixes elastic#9343
  • Loading branch information
yaauie committed Apr 10, 2018
1 parent a9c97d4 commit 8bc137b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/compiler/lscl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def validate!
duplicate_values = find_duplicate_keys

if duplicate_values.size > 0
raise ConfigurationError.new(
raise ::LogStash::ConfigurationError.new(
I18n.t("logstash.runner.configuration.invalid_plugin_settings_duplicate_keys",
:keys => duplicate_values.join(', '),
:line => input.line_of(interval.first),
Expand Down

0 comments on commit 8bc137b

Please sign in to comment.