Method: VirtualBox::COM::COMException#initialize
- Defined in:
- lib/virtualbox/com/exceptions.rb
#initialize(data = {}) ⇒ COMException
10 11 12 13 14 15 16 17 18 |
# File 'lib/virtualbox/com/exceptions.rb', line 10 def initialize(data={}) @data = case data when Hash then data when String then { :message => data } when Integer then { :code => data } else raise "don't know how to interprete exception parameter" end super("error in API call: 0x#{data[:code].to_s(16)}") end |