Exception: XlsxWriter::Error
- Inherits:
-
StandardError
- Object
- StandardError
- XlsxWriter::Error
- Defined in:
- lib/xlsxwriter/error.rb
Overview
An error returned from libxlsxwriter. Numeric code is accessible via #code
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Error code.
Instance Method Summary collapse
-
#initialize(msg, code = nil) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(msg, code = nil) ⇒ Error
Returns a new instance of Error.
10 11 12 13 |
# File 'lib/xlsxwriter/error.rb', line 10 def initialize(msg, code = nil) super(msg) @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Error code
8 9 10 |
# File 'lib/xlsxwriter/error.rb', line 8 def code @code end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/xlsxwriter/error.rb', line 15 def inspect "#<#{self.class}: #{self}#{" (code: #{code})" if code}>" end |