Exception: Ballast::Errors::BaseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/ballast/errors.rb

Overview

The base error raised from an application.

Direct Known Subclasses

InvalidDomain, PerformError, ValidationError

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (BaseError) initialize(msg = nil)

Returns a new instance of BaseError



16
17
18
19
# File 'lib/ballast/errors.rb', line 16

def initialize(msg = nil)
  super(msg)
  @response = msg
end

Instance Attribute Details

- (String|Hash) response (readonly)

Returns The response which contains either a message or an hash with status code and a error message.

Returns:

  • (String|Hash)

    The response which contains either a message or an hash with status code and a error message.



13
14
15
16
17
18
19
20
# File 'lib/ballast/errors.rb', line 13

class BaseError < RuntimeError
  attr_reader :response

  def initialize(msg = nil)
    super(msg)
    @response = msg
  end
end