Method: OCIError#initialize
- Defined in:
- lib/oci8/oci8.rb
#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(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 |