//-----------------------------------------------------------------------------
// Copyright (c) 2016, 2017 Oracle and/or its affiliates.  All rights reserved.
// This program is free software: you can modify it and/or redistribute it
// under the terms of:
//
// (i)  the Universal Permissive License v 1.0 or at your option, any
//      later version (http://oss.oracle.com/licenses/upl); and/or
//
// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0)
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// dpiErrorMessages.h
//   Definition of error messages used in ODPI-C.
//-----------------------------------------------------------------------------

#include "dpiImpl.h"

static const char* const dpiErrorMessages[DPI_ERR_MAX - DPI_ERR_NO_ERR] = {
    "DPI-1000: no error", // DPI_ERR_NO_ERR
    "DPI-1001: out of memory", // DPI_ERR_NO_MEMORY
    "DPI-1002: invalid %s handle", // DPI_ERR_INVALID_HANDLE
    "DPI-1003: OCI error handle is not initialized", // DPI_ERR_ERR_NOT_INITIALIZED
    "DPI-1004: unable to get error message", // DPI_ERR_GET_FAILED
    "DPI-1005: unable to acquire Oracle environment handle", // DPI_ERR_CREATE_ENV
    "DPI-1006: unable to convert text to session character set", // DPI_ERR_CONVERT_TEXT
    "DPI-1007: no query has been executed", // DPI_ERR_QUERY_NOT_EXECUTED
    "DPI-1008: data type %d is not supported", // DPI_ERR_UNHANDLED_DATA_TYPE
    "DPI-1009: zero-based position %u is not valid with max array size of %u", // DPI_ERR_INVALID_ARRAY_POSITION
    "DPI-1010: not connected", // DPI_ERR_NOT_CONNECTED
    "DPI-1011: connection was not acquired from a session pool", // DPI_ERR_CONN_NOT_IN_POOL
    "DPI-1012: proxy authentication is not possible with homogeneous pools", // DPI_ERR_INVALID_PROXY
    "DPI-1013: not supported", // DPI_ERR_NOT_SUPPORTED
    "DPI-1014: conversion between Oracle type %d and native type %d is not implemented", // DPI_ERR_UNHANDLED_CONVERSION
    "DPI-1015: array size of %u is too large", // DPI_ERR_ARRAY_SIZE_TOO_BIG
    "DPI-1016: invalid date", // DPI_ERR_INVALID_DATE
    "DPI-1017: value is null", // DPI_ERR_VALUE_IS_NULL
    "DPI-1018: array size of %u is too small", // DPI_ERR_ARRAY_SIZE_TOO_SMALL
    "DPI-1019: buffer size of %u is too small", // DPI_ERR_BUFFER_SIZE_TOO_SMALL
    "DPI-1020: version %d.%d is not supported by ODPI-C library version %d.%d", // DPI_ERR_VERSION_NOT_SUPPORTED
    "DPI-1021: Oracle type %u is invalid", // DPI_ERR_INVALID_ORACLE_TYPE
    "DPI-1022: attribute %.*s is not part of object type %.*s.%.*s", // DPI_ERR_WRONG_ATTR
    "DPI-1023: object %.*s.%.*s is not a collection", // DPI_ERR_NOT_COLLECTION
    "DPI-1024: element at index %d does not exist", // DPI_ERR_INVALID_INDEX
    "DPI-1025: no object type specified for object variable", // DPI_ERR_NO_OBJECT_TYPE
    "DPI-1026: invalid character set %s", // DPI_ERR_INVALID_CHARSET
    "DPI-1027: scroll operation would go out of the result set", // DPI_ERR_SCROLL_OUT_OF_RS
    "DPI-1028: query position %u is invalid", // DPI_ERR_QUERY_POSITION_INVALID
    "DPI-1029: no row currently fetched", // DPI_ERR_NO_ROW_FETCHED
    "DPI-1030: unable to get or set error structure for thread local storage", // DPI_ERR_TLS_ERROR
    "DPI-1031: array size cannot be zero", // DPI_ERR_ARRAY_SIZE_ZERO
    "DPI-1032: user name and password cannot be set when using external authentication", // DPI_ERR_EXT_AUTH_WITH_CREDENTIALS
    "DPI-1033: unable to get row offset", // DPI_ERR_CANNOT_GET_ROW_OFFSET
    "DPI-1034: connection created from external handle cannot be closed", // DPI_ERR_CONN_IS_EXTERNAL
    "DPI-1035: size of the transaction ID is %u and cannot exceed %u", // DPI_ERR_TRANS_ID_TOO_LARGE
    "DPI-1036: size of the branch ID is %u and cannot exceed %u", // DPI_ERR_BRANCH_ID_TOO_LARGE
    "DPI-1037: column at array position %u fetched with error %u", // DPI_ERR_COLUMN_FETCH
    "DPI-1038: Oracle client %u.%u cannot be used because ODPI-C was compiled with Oracle client %u.%u", // DPI_ERR_OCI_VERSION_NOT_SUPPORTED
    "DPI-1039: statement was already closed", // DPI_ERR_STMT_CLOSED
    "DPI-1040: LOB was already closed", // DPI_ERR_LOB_CLOSED
    "DPI-1041: invalid character set id %d", // DPI_ERR_INVALID_CHARSET_ID
    "DPI-1042: invalid OCI number", // DPI_ERR_INVALID_OCI_NUMBER
    "DPI-1043: invalid number", // DPI_ERR_INVALID_NUMBER
    "DPI-1044: number too large", // DPI_ERR_NUMBER_TOO_LARGE
    "DPI-1045: strings converted to numbers can only be up to 172 characters long", // DPI_ERR_NUMBER_STRING_TOO_LONG
    "DPI-1046: parameter %s cannot be a NULL pointer", // DPI_ERR_NULL_POINTER_PARAMETER
    "DPI-1047: Oracle Client library cannot be loaded: %s. See https://oracle.github.io/odpi/doc/installation.html for help", // DPI_ERR_LOAD_LIBRARY
    "DPI-1048: invalid symbol num: %u", // DPI_ERR_INVALID_SYMBOL_NUM
    "DPI-1049: symbol %s not found in OCI library", // DPI_ERR_LOAD_SYMBOL
    "DPI-1050: Oracle Client library must be at release 11.2 or higher", // DPI_ERR_LIBRARY_TOO_OLD
    "DPI-1051: conversion to %s results in overflow", // DPI_ERR_OVERFLOW
};

