Exception: OCIError
- Inherits:
-
OCIException
- Object
- StandardError
- OCIException
- OCIError
- Defined in:
- ext/oci8/oci8.c
Direct Known Subclasses
Instance Method Summary collapse
-
#code ⇒ Object
begin — OCIError#code() =end.
-
#codes ⇒ Object
begin — OCIError#codes() =end.
- #initialize(*args) ⇒ Object constructor
-
#messages ⇒ Object
begin — OCIError#messages() =end.
-
#parseErrorOffset ⇒ Object
begin — OCIError#parseErrorOffset() =end.
-
#sql ⇒ Object
begin — OCIError#sql() (Oracle 8.1.6 or later) =end.
Constructor Details
#initialize(*args) ⇒ Object
126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'ext/oci8/error.c', line 126
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
#code ⇒ Object
begin
— OCIError#code()
end
145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'ext/oci8/error.c', line 145
static VALUE oci8_error_code(VALUE self)
{
VALUE ary = rb_ivar_get(self, oci8_id_code);
if (NIL_P(ary)) {
return Qnil;
}
Check_Type(ary, T_ARRAY);
if (RARRAY_LEN(ary) == 0) {
return Qnil;
}
return RARRAY_PTR(ary)[0];
}
|
#codes ⇒ Object
begin
— OCIError#codes()
end
163 164 165 166 |
# File 'ext/oci8/error.c', line 163
static VALUE oci8_error_code_array(VALUE self)
{
return rb_ivar_get(self, oci8_id_code);
}
|
#messages ⇒ Object
begin
— OCIError#messages()
end
179 180 181 182 |
# File 'ext/oci8/error.c', line 179
static VALUE oci8_error_message_array(VALUE self)
{
return rb_ivar_get(self, oci8_id_message);
}
|
#parseErrorOffset ⇒ Object
begin
— OCIError#parseErrorOffset()
end
190 191 192 193 |
# File 'ext/oci8/error.c', line 190
static VALUE oci8_error_parse_error_offset(VALUE self)
{
return rb_ivar_get(self, oci8_id_parse_error_offset);
}
|
#sql ⇒ Object
begin
— OCIError#sql()
(Oracle 8.1.6 or later)
end
203 204 205 206 |
# File 'ext/oci8/error.c', line 203
static VALUE oci8_error_sql(VALUE self)
{
return rb_ivar_get(self, oci8_id_sql);
}
|