Exception: Couchbase::Error::Base

Inherits:
StandardError
  • Object
show all
Defined in:
ext/couchbase_ext/couchbase_ext.c,
ext/couchbase_ext/couchbase_ext.c

Overview

The base error class

Since:

Direct Known Subclasses

Auth, BucketNotFound, Busy, ClientNoMemory, Connect, DeltaBadval, Internal, Invalid, KeyExists, Libcouchbase, Libevent, Network, NoMemory, NotFound, NotMyVbucket, NotStored, NotSupported, Protocol, Range, TemporaryFail, Timeout, TooBig, UnknownCommand, UnknownHost, ValueFormat, View

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Fixnum) cas (readonly)

The version of the key (nil unless accessible)

Returns:

  • (Fixnum)

    the version of the key (nil unless accessible)

Since:

  • 1.0.0

- (Fixnum) error (readonly)

The underlying libcouchbase library could return one of the following error codes. The ruby client will wrap these errors into appropriate exception class, derived from Couchbase::Error::Base.

0x00 :LIBCOUCHBASE_SUCCESS (Success)
0x01 :LIBCOUCHBASE_AUTH_CONTINUE (Continue authentication)
0x02 :LIBCOUCHBASE_AUTH_ERROR (Authentication error)
0x03 :LIBCOUCHBASE_DELTA_BADVAL (Not a number)
0x04 :LIBCOUCHBASE_E2BIG (Object too big)
0x05 :LIBCOUCHBASE_EBUSY (Too busy. Try again later)
0x06 :LIBCOUCHBASE_EINTERNAL (Internal error)
0x07 :LIBCOUCHBASE_EINVAL (Invalid arguments)
0x08 :LIBCOUCHBASE_ENOMEM (Out of memory)
0x09 :LIBCOUCHBASE_ERANGE (Invalid range)
0x0a :LIBCOUCHBASE_ERROR (Generic error)
0x0b :LIBCOUCHBASE_ETMPFAIL (Temporary failure. Try again later)
0x0c :LIBCOUCHBASE_KEY_EEXISTS (Key exists (with a different CAS value))
0x0d :LIBCOUCHBASE_KEY_ENOENT (No such key)
0x0e :LIBCOUCHBASE_LIBEVENT_ERROR (Problem using libevent)
0x0f :LIBCOUCHBASE_NETWORK_ERROR (Network error)
0x10 :LIBCOUCHBASE_NOT_MY_VBUCKET (The vbucket is not located on this server)
0x11 :LIBCOUCHBASE_NOT_STORED (Not stored)
0x12 :LIBCOUCHBASE_NOT_SUPPORTED (Not supported)
0x13 :LIBCOUCHBASE_UNKNOWN_COMMAND (Unknown command)
0x14 :LIBCOUCHBASE_UNKNOWN_HOST (Unknown host)
0x15 :LIBCOUCHBASE_PROTOCOL_ERROR (Protocol error)
0x16 :LIBCOUCHBASE_ETIMEDOUT (Operation timed out)
0x17 :LIBCOUCHBASE_CONNECT_ERROR (Connection failure)
0x18 :LIBCOUCHBASE_BUCKET_ENOENT (No such bucket)
0x18 :LIBCOUCHBASE_CLIENT_ENOMEM (Out of memory on the client)

Returns:

  • (Fixnum)

    the error code from libcouchbase

Since:

  • 1.0.0

- (String) key (readonly)

The key which generated error

Returns:

  • (String)

    the key which generated error

Since:

  • 1.0.0

- (Symbol) operation (readonly)

The operation (nil unless accessible)

Returns:

  • (Symbol)

    the operation (nil unless accessible)

Since:

  • 1.0.0