/usr/lib/ruby/vendor_ruby/nokogiri/xml/syntax_error.rb is in ruby-nokogiri 1.6.7.2-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | module Nokogiri
module XML
###
# This class provides information about XML SyntaxErrors. These
# exceptions are typically stored on Nokogiri::XML::Document#errors.
class SyntaxError < ::Nokogiri::SyntaxError
attr_reader :domain
attr_reader :code
attr_reader :level
attr_reader :file
attr_reader :line
attr_reader :str1
attr_reader :str2
attr_reader :str3
attr_reader :int1
attr_reader :column
###
# return true if this is a non error
def none?
level == 0
end
###
# return true if this is a warning
def warning?
level == 1
end
###
# return true if this is an error
def error?
level == 2
end
###
# return true if this error is fatal
def fatal?
level == 3
end
def to_s
super.chomp
end
end
end
end
|