Exception: PicOpc::PicOpcException

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cause) ⇒ PicOpcException

Returns a new instance of PicOpcException.



12
13
14
# File 'lib/picopc/picopc.rb', line 12

def initialize cause
  @cause = cause
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



10
11
12
# File 'lib/picopc/picopc.rb', line 10

def cause
  @cause
end

Class Method Details

.[](e, info = nil) ⇒ Object

Raises:

  • (e2)


16
17
18
19
20
# File 'lib/picopc/picopc.rb', line 16

def self.[](e, info = nil)
  raise e if e.class == PicOpcException
  e2 = new(e)
  raise e2, "OPC/OLE Exceptioni #{info || ''}: #{e.message}", e.backtrace
end