Exception: Buda::Errors::BudaError

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

Overview

Error definitions for handling wrong requests

Instance Method Summary collapse

Constructor Details

#initialize(message, doc_url = Buda::Constants::GENERAL_DOC_URL) ⇒ BudaError

Returns a new instance of BudaError.



9
10
11
12
13
# File 'lib/buda/errors.rb', line 9

def initialize(message, doc_url = Buda::Constants::GENERAL_DOC_URL)
  super()
  @message = message
  @doc_url = doc_url
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/buda/errors.rb', line 15

def message
  "\n#{@message}\n Please check the docs at: #{@doc_url}"
end

#to_sObject



19
20
21
# File 'lib/buda/errors.rb', line 19

def to_s
  message
end