Exception: XlsxWriter::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xlsxwriter/error.rb

Overview

An error returned from libxlsxwriter. Numeric code is accessible via #code

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Error code



8
9
10
# File 'lib/xlsxwriter/error.rb', line 8

def code
  @code
end

Instance Method Details

#inspectObject



15
16
17
# File 'lib/xlsxwriter/error.rb', line 15

def inspect
  "#<#{self.class}: #{self}#{" (code: #{code})" if code}>"
end