Exception: OCIError

Inherits:
OCIException show all
Defined in:
ext/oci8/error.c

Direct Known Subclasses

OCISuccessWithInfo

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Object



221
222
223
224
225
226
227
228
229
230
231
232
# File 'ext/oci8/error.c', line 221

static VALUE oci8_error_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE msg;
    VALUE code;

    rb_scan_args(argc, argv, "02", &msg, &code);
    rb_call_super(argc > 1 ? 1 : argc, argv);
    if (!NIL_P(code)) {
        rb_ivar_set(self, oci8_id_code, rb_ary_new3(1, code));
    }
    return Qnil;
}

Instance Method Details

#codeObject

begin

— OCIError#code()

end



239
240
241
242
243
244
245
246
# File 'ext/oci8/error.c', line 239

static VALUE oci8_error_code(VALUE self)
{
    VALUE ary = rb_ivar_get(self, oci8_id_code);
    if (RARRAY_LEN(ary) == 0) {
        return Qnil;
    }
    return RARRAY_PTR(ary)[0];
}

#codesObject

begin

— OCIError#codes()

end



253
254
255
256
# File 'ext/oci8/error.c', line 253

static VALUE oci8_error_code_array(VALUE self)
{
    return rb_ivar_get(self, oci8_id_code);
}

#messagesObject

begin

— OCIError#messages()

end



269
270
271
272
# File 'ext/oci8/error.c', line 269

static VALUE oci8_error_message_array(VALUE self)
{
    return rb_ivar_get(self, oci8_id_message);
}

#parseErrorOffsetObject

begin

— OCIError#parseErrorOffset()

end



280
281
282
283
# File 'ext/oci8/error.c', line 280

static VALUE oci8_error_parse_error_offset(VALUE self)
{
    return rb_ivar_get(self, oci8_id_parse_error_offset);
}

#sqlObject

begin

— OCIError#sql()

(Oracle 8.1.6 or later)

end



293
294
295
296
# File 'ext/oci8/error.c', line 293

static VALUE oci8_error_sql(VALUE self)
{
    return rb_ivar_get(self, oci8_id_sql);
}