Exception: Beachcomber::CombError
- 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().
Direct Known Subclasses
BadFlagsError, BusyError, ConnectionFailedError, DaemonNotRunning, IoError, PanicError, ProtocolError, ServerError, TimeoutError, VersionSkewError
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Instance Method Summary collapse
-
#initialize(kind, message) ⇒ CombError
constructor
A new instance of CombError.
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, ) @kind = kind super("beachcomber: #{} (kind=#{kind}, lib_version=#{safe_version})") end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
21 22 23 |
# File 'lib/beachcomber/errors.rb', line 21 def kind @kind end |