Skip to content

Commit

Permalink
Merge fce3c7b into 15d59a6
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Jan 31, 2018
2 parents 15d59a6 + fce3c7b commit ab838cb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/cfa/augeas_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,13 @@ def report_error(aug)
end

msg = aug.get("/augeas/text/store/error/message")
location = aug.get("/augeas/text/store/error/lens")
raise "Augeas parsing/serializing error: #{msg} at #{location}"
line = aug.get("/augeas/text/store/error/line")
column = aug.get("/augeas/text/store/error/char")
# file, line+column range, like
# "/usr/share/augeas/lenses/dist/hosts.aug:23.12-.42:"
lens = aug.get("/augeas/text/store/error/lens")
raise "Augeas parsing/serializing error: #{msg}" \
" at #{line}:#{column}, lens #{lens}"
end
end
end

0 comments on commit ab838cb

Please sign in to comment.