class CryBase::CouchBase::Services::KV::Error

Overview

Base exception for any non-Success status returned by the KV service. Subclasses (NotFound, AuthFailed) cover well-known cases; everything else surfaces as a plain Error.

begin
  kv.get("missing")
rescue ex : KV::Error
  ex.status # => KV::Status::KeyNotFound
end

Direct Known Subclasses

Defined in:

crybase/couchbase/services/kv/error.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(status : Status, op : String) #

[View source]

Instance Method Detail

def status : Status #

The protocol status that triggered the exception.


[View source]