Exception: Kwartz::BaseError
- Inherits:
-
KwartzError
- Object
- StandardError
- KwartzError
- Kwartz::BaseError
- Defined in:
- lib/kwartz/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#linenum ⇒ Object
Returns the value of attribute linenum.
Instance Method Summary collapse
-
#initialize(message, filename, linenum, column = nil) ⇒ BaseError
constructor
A new instance of BaseError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, filename, linenum, column = nil) ⇒ BaseError
Returns a new instance of BaseError.
19 20 21 22 23 24 |
# File 'lib/kwartz/error.rb', line 19 def initialize(, filename, linenum, column=nil) super() @filename = filename || '-' @linenum = linenum @column = column end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
26 27 28 |
# File 'lib/kwartz/error.rb', line 26 def column @column end |
#filename ⇒ Object
Returns the value of attribute filename.
26 27 28 |
# File 'lib/kwartz/error.rb', line 26 def filename @filename end |
#linenum ⇒ Object
Returns the value of attribute linenum.
26 27 28 |
# File 'lib/kwartz/error.rb', line 26 def linenum @linenum end |
Instance Method Details
#to_s ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/kwartz/error.rb', line 28 def to_s return super unless @linenum #return "line #{@linenum}, column #{@column}: " + super if @column return "#{@filename}:#{@linenum}:#{@column}: " + super else return "#{@filename}:#{@linenum}: " + super end end |