Exception: Beachcomber::CombError

Inherits:
Error
  • Object
show all
Defined in:
lib/beachcomber/errors.rb

Overview

Base class for every ok: false envelope the library returns, plus the library-level conditions (bad_flags, busy, panic, version_skew) it can raise outside the CombError variant set.

kind is the stable, machine-readable slug from the envelope's error.kind field (e.g. "server_error", "daemon_not_running"). The message always includes the loaded library's bc_version().

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, message) ⇒ CombError

Returns a new instance of CombError.



23
24
25
26
# File 'lib/beachcomber/errors.rb', line 23

def initialize(kind, message)
  @kind = kind
  super("beachcomber: #{message} (kind=#{kind}, lib_version=#{safe_version})")
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



21
22
23
# File 'lib/beachcomber/errors.rb', line 21

def kind
  @kind
end