ParserFile: shorter error message due to context
This commit is contained in:
parent
1a289c872d
commit
7c2b95d24b
|
@ -44,7 +44,7 @@ module GitHubChangelogGenerator
|
||||||
option_name, value = extract_pair(line)
|
option_name, value = extract_pair(line)
|
||||||
@options[option_key_for(option_name)] = convert_value(value, option_name)
|
@options[option_key_for(option_name)] = convert_value(value, option_name)
|
||||||
rescue
|
rescue
|
||||||
raise ParserError, "Config file parsing failed on line ##{line_number}: \"#{line.gsub(/[\n\r]+/, '')}\""
|
raise ParserError, "Failed on line ##{line_number}: \"#{line.gsub(/[\n\r]+/, '')}\""
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a the option name as a symbol and its string value sans newlines.
|
# Returns a the option name as a symbol and its string value sans newlines.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user