Exception: Bricolage::SQLException

Inherits:
JobFailure show all
Defined in:
lib/bricolage/exception.rb

Overview

various SQL exception

Direct Known Subclasses

PostgreSQLException

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, orig = nil) ⇒ SQLException

Returns a new instance of SQLException.



20
21
22
23
# File 'lib/bricolage/exception.rb', line 20

def initialize(msg, orig = nil)
  super msg
  @original = orig
end

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



25
26
27
# File 'lib/bricolage/exception.rb', line 25

def original
  @original
end

Class Method Details

.wrap(ex) ⇒ Object



16
17
18
# File 'lib/bricolage/exception.rb', line 16

def SQLException.wrap(ex)
  new(ex.message, ex)
end