- lvl
- severity level (string)
- msg
- message describing error
- trace
- array (stack) of [file,line] showing input location
# File fileproc.rb, line 50
def initialize(lvl, msg, trace)
@lvl = lvl
@msg = msg
@trace = trace
end
produce printable message, parsable by most editors
# File fileproc.rb, line 58
def message()
to_s
end
produce printable message, parsable by most editors
# File fileproc.rb, line 64
def to_s()
msg = ""
if (start = @trace.size - 2) >= 0
start.downto(0) {
|i| msg += "\tIn file included from: #{@trace[i].join(":")}\n"
}
end
msg += "#{@lvl}: #{@trace.last.join(":")}: #{@msg}.\n"
end