Exception: WikipediaWrapper::FormatError

Inherits:
WikipediaError show all
Defined in:
lib/wikipedia_wrapper/exception.rb

Overview

Exception raised when the expected return format does not match what was received

Instance Method Summary collapse

Constructor Details

#initialize(function, msg) ⇒ FormatError

Returns a new instance of FormatError.


33
34
35
36
# File 'lib/wikipedia_wrapper/exception.rb', line 33

def initialize(function, msg)
  @func = function
  @msg = msg
end

Instance Method Details

#messageObject


38
39
40
# File 'lib/wikipedia_wrapper/exception.rb', line 38

def message
  "Format Error calling \"#{@func}\": #{@msg}"
end