Exception: OCIError
- Inherits:
-
OCIException
- Object
- StandardError
- OCIException
- OCIError
- Defined in:
- ext/oci8/error.c,
lib/oci8/oci8.rb,
ext/oci8/error.c
Overview
Subclass of OCIException
The following exceptions are defined as subclasses of OCIError.
-
OCISuccessWithInfo
-
OCINoData (It had been a subclass of OCIException, not OCIError, until ruby-oci8 2.0)
Raised when underlying Oracle Call Interface failed with an Oracle error code such as ORA-00001.
Direct Known Subclasses
Instance Attribute Summary collapse
- #code ⇒ Object readonly
- #parse_error_offset ⇒ Object (also: #parseErrorOffset) readonly
- #sql ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(*args) ⇒ OCIError
constructor
A new instance of OCIError.
Constructor Details
#initialize(message, error_code = nil, sql_stmt = nil, parse_error_offset = nil) ⇒ OCIError #initialize(error_code, *params) ⇒ OCIError
Returns a new instance of OCIError.
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/oci8/oci8.rb', line 623 def initialize(*args) if args.length > 0 if args[0].is_a? Integer @code = args.shift super(OCI8.(@code).gsub('%s') {|s| args.empty? ? '%s' : args.shift}) @sql = nil @parse_error_offset = nil else msg, @code, @sql, @parse_error_offset = args super(msg) end else super() end end |