class OCIError
def initialize(*args)
-
params
(String, ...
) -- parameters which replace '%s' -
error_code
(Integer
) -- Oracle error code -
parse_error_offset
(Integer
) -- -
sql_stmt
(String
) -- SQL statement -
error_code
(Integer
) -- Oracle error code -
message
(String
) -- error message
Overloads:
-
initialize(error_code, *params)
-
initialize(message, error_code = nil, sql_stmt = nil, parse_error_offset = nil)
def initialize(*args) if args.length > 0 if args[0].is_a? Fixnum @code = args.shift super(OCI8.error_message(@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