Exception: Ballast::Errors::Base

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

Overview

The base error raised from an application.

Direct Known Subclasses

Failure, InvalidDomain

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details = nil) ⇒ Base

Creates a new error.

Parameters:

  • details (String|Hash|NilClass) (defaults to: nil)

    The details of this error.



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

def initialize(details = nil)
  super("")
  @details = details
end

Instance Attribute Details

#detailsString|Hash|NilClass (readonly)

Returns The details of the error. If a Hash, it should contain the keys status and error.

Returns:

  • (String|Hash|NilClass)

    The details of the error. If a Hash, it should contain the keys status and error.



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

class Base < RuntimeError
  attr_reader :details

  # Creates a new error.
  #
  # @param details [String|Hash|NilClass] The details of this error.
  def initialize(details = nil)
    super("")
    @details = details
  end
end