Exception: BorrowDirect::Error

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

Direct Known Subclasses

HttpError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, bd_code = nil) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
11
# File 'lib/borrow_direct/error.rb', line 5

def initialize(msg, bd_code = nil) 
  @bd_code = bd_code
  if @bd_code
    msg = "#{@bd_code}: #{msg}"
  end
  super(msg)      
end

Instance Attribute Details

#bd_codeObject (readonly)

Returns the value of attribute bd_code.



3
4
5
# File 'lib/borrow_direct/error.rb', line 3

def bd_code
  @bd_code
end