Class: OCIError
- Inherits:
-
Object
- Object
- OCIError
- Defined in:
- ext/oci8/error.c,
lib/oci8/oci8.rb
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.
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.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
# File 'lib/oci8/oci8.rb', line 628 def initialize(*args) if args.length > 0 if args[0].is_a? Integer @code = args.shift super(STACI.(@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 |