Exception: AerospikeNative::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
ext/aerospike_native/exception.c

Constant Summary collapse

ERR_CLIENT_ABORT =
INT2FIX(AEROSPIKE_ERR_CLIENT_ABORT)
ERR_INVALID_HOST =
INT2FIX(AEROSPIKE_ERR_INVALID_HOST)
NO_MORE_RECORDS =
INT2FIX(AEROSPIKE_NO_MORE_RECORDS)
ERR_PARAM =
INT2FIX(AEROSPIKE_ERR_PARAM)
ERR_CLIENT =
INT2FIX(AEROSPIKE_ERR_CLIENT)
OK =
INT2FIX(AEROSPIKE_OK)
ERR_SERVER =
INT2FIX(AEROSPIKE_ERR_SERVER)
ERR_RECORD_NOT_FOUND =

2

INT2FIX(AEROSPIKE_ERR_RECORD_NOT_FOUND)
ERR_RECORD_EXISTS =

5

INT2FIX(AEROSPIKE_ERR_RECORD_EXISTS)
ERR_BIN_EXISTS =

6

INT2FIX(AEROSPIKE_ERR_BIN_EXISTS)
ERR_TIMEOUT =

9

INT2FIX(AEROSPIKE_ERR_TIMEOUT)
ERR_RECORD_TOO_BIG =

13

INT2FIX(AEROSPIKE_ERR_RECORD_TOO_BIG)
ERR_RECORD_BUSY =

13

INT2FIX(AEROSPIKE_ERR_RECORD_BUSY)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vMessage) ⇒ Object



5
6
7
8
9
10
11
# File 'ext/aerospike_native/exception.c', line 5

VALUE exception_initialize(VALUE vSelf, VALUE vMessage)
{
    Check_Type(vMessage, T_STRING);
    rb_iv_set(vSelf, "@message", vMessage);

    return vSelf;
}

Instance Attribute Details

#codeObject (readonly)

#messageObject (readonly)

Instance Method Details

#inspectObject



13
14
15
16
17
18
19
20
21
22
23
# File 'ext/aerospike_native/exception.c', line 13

VALUE exception_inspect(VALUE vSelf)
{
    VALUE vCode, vMsg;
    char sMsg[200];

    vCode = rb_iv_get(vSelf, "@code");
    vMsg = rb_iv_get(vSelf, "@message");
    sprintf(sMsg, "#<AerospikeNative::Exception: @code=%d, @message=\"%s\">", NUM2INT(vCode), StringValueCStr(vMsg));

    return rb_str_new2(sMsg);
}