bt_result_codes.h File Reference

Defines the result codes returned by Basis Tech API functions. More...

This graph shows which files directly or indirectly include this file:


Defines

#define BT_ERR_BUFFER_TRUNCATED   -2
 Data was truncated.
#define BT_ERR_DATA_GENERATION_INCOMPATIBLE   -157
 Data generation is inconsistent/incompatible.
#define BT_ERR_DATA_NOT_LICENSED   -155
 Data is not licensed.
#define BT_ERR_DATA_VERSION   -160
 Data has the wrong version.
#define BT_ERR_DATUM_NOT_FOUND   -156
 Datum not found.
#define BT_ERR_FILE_IO_FAILED   -159
 File I/O failed.
#define BT_ERR_FILE_NOT_FOUND   -102
 File could not be found.
#define BT_ERR_FILE_OPEN_FAILED   -158
 File could not be opened.
#define BT_ERR_FILE_PERMISSION_DENIED   -103
 Permission to access file was denied.
#define BT_ERR_INTERNAL   -3
 An internal error occurred.
#define BT_ERR_INTERNAL_ERROR_SPACE_START   -10000
 Internal code.
#define BT_ERR_INVALID_ARGUMENT   -51
 An argument is invalid.
#define BT_ERR_INVALID_FILE_FORMAT   -52
 The format of a file argument is invalid.
#define BT_ERR_INVALID_INSTANCE   -50
 A handle is invalid.
#define BT_ERR_LICENSE_EXPIRED   -151
 License has expired.
#define BT_ERR_LICENSE_FILE_NOT_FOUND   -154
 License file was not found.
#define BT_ERR_LICENSE_INVALID   -150
 License is not valid.
#define BT_ERR_LICENSE_NOT_AVAILABLE   -153
 License is not available.
#define BT_ERR_LICENSE_WRONG_PLATFORM   -152
 License has invalid platform.
#define BT_ERR_OUT_OF_MEMORY   -101
 No more memory.
#define BT_ERR_SYSTEM_ERROR   -100
 A system error occurred.
#define BT_ERR_UNIMPLEMENTED   -4
 Requested functionality is not implemented.
#define BT_ERR_UNSPECIFIED   -1
 An unspecified error occurred.
#define BT_NO_MORE_DATA   2
 The function has processed all of its data.
#define BT_OK   1
 No errors.
#define BT_WANT_MORE_DATA   3
 The function needs more data.

Detailed Description

This file defines the common result codes that can be returned by the Basis Technology API functions. It also defines error block ranges that other BT libraries can use for their own codes. This allows these libraries to define their own error codes independently of the shared code space without worrying that they will cross- contaminate one another.

Allocation

Positive error codes indicate success (BT_OK) or a non-Error condition. Currently these are limited to two results used by the language analyzers, BT_NO_MORE_DATA and BT_WANT_MORE_DATA.

Negative error codes indicate an error condition of some form. Three ranges are defined in this file:

      Range                                  Description
  ------------              -------------------------------------------------
    -1 --  -49              Internal errors, generally. Oldest strata.
   -50 --  -99              Argument, class, or state validity errors.
  -100 -- -149              System (memory, file, etc.) errors.
  

The following ranges are reserved for other components and libraries:

      Range                                  Description
  ------------              -------------------------------------------------
  -150 -- -174              License Key library (btkey)
  

All of the above ranges are for errors that can be returned by the public Basis Technology APIs. For internal results, any value below -10000 may be used.


Define Documentation

#define BT_ERR_BUFFER_TRUNCATED   -2

This error code is returned when the data written into a BT_Char16Buf was truncated. This is an informational message and does not necessarily mean that an error occurred during processing.

#define BT_ERR_DATA_GENERATION_INCOMPATIBLE   -157

This error code is returned when an attempt is made to initiate use of a data base, table, dictionary, or other data collection which is not of a compatible generation, i.e., was not built with, intended to be used with, or operable with, the versions of other comparable collections already in use by the application or subsystem.

#define BT_ERR_DATA_NOT_LICENSED   -155

This error code is returned when an attempt is made to create a dictionary from a data file that is not licensed.

#define BT_ERR_DATA_VERSION   -160

This error code is returned when attempting to open or read a data file with unexpected version number.

#define BT_ERR_DATUM_NOT_FOUND   -156

This error code is returned when a datum, such as a record or table entry, which has been requested, cannot be found in the corresponding resource.

#define BT_ERR_FILE_IO_FAILED   -159

This error code is returned when reading or writing a open file failed.

#define BT_ERR_FILE_NOT_FOUND   -102

This error code is returned when a file whose name is passed to the function could not be found.

#define BT_ERR_FILE_OPEN_FAILED   -158

This error code is returned when a file whose name is passed to the function could not be opened. The problem could be that the file does not exist or that the caller lacks access.

#define BT_ERR_FILE_PERMISSION_DENIED   -103

This error code is returned when a file whose name is passed to the function could not be accessed because of a permissions restriction.

#define BT_ERR_INTERNAL   -3

This error code is returned when the function encounters an internal error. Contact Basis Technology through the appropriate email address for the product you are using. In your email, carefully describe the the scenario in which the error occurred.

#define BT_ERR_INTERNAL_ERROR_SPACE_START   -10000

This is not an error code but is used for internal bookkeeping only.

#define BT_ERR_INVALID_ARGUMENT   -51

This error code is returned when an argument passed to the function is invalid.

#define BT_ERR_INVALID_FILE_FORMAT   -52

This error code is returned when a file whose name is passed to the function has an invalid format.

#define BT_ERR_INVALID_INSTANCE   -50

This error code is returned when a handle passed to the function (generally a C function) is invalid.

#define BT_ERR_LICENSE_EXPIRED   -151

This error code is returned at initialization when a license file is present but has passed its expiration date.

#define BT_ERR_LICENSE_FILE_NOT_FOUND   -154

This error code is returned at initialization when a license file could not be found or could not be processed.

#define BT_ERR_LICENSE_INVALID   -150

This error code is returned at initialization when a license file is present but the required key is not valid. The key may be missing a field, or a field value may not be valid.

#define BT_ERR_LICENSE_NOT_AVAILABLE   -153

This error code is returned when a license file is not available. This happens when attempting to run a language processor for which there is no license.

#define BT_ERR_LICENSE_WRONG_PLATFORM   -152

This error code is returned at initialization when a license file is present but the platform in the license key is not valid.

#define BT_ERR_OUT_OF_MEMORY   -101

This error code is returned when the function could not allocate new memory, or if there is insufficient memory for a required operation.

#define BT_ERR_SYSTEM_ERROR   -100

This error code is returned when the function encounters a system- level error. The caller can check the value of errno to determine the exact error.

#define BT_ERR_UNIMPLEMENTED   -4

This error code is returned when the function does not implement the functionality requested. Typically, this happens when a platform- specific feature cannot be used because it doesn't exist on the the present platform.

#define BT_ERR_UNSPECIFIED   -1

This error code is returned when the function encounters an unspecified error.

#define BT_NO_MORE_DATA   2

This error code is returned when there is no more data. This is an informational message and does not necessarily mean that an error occurred during processing.

#define BT_OK   1

This error code is returned when the function completed successfully.

#define BT_WANT_MORE_DATA   3

This error code is returned when the function cannot continue until the caller passes the object more data. This is an informational message and does not necessarily mean that an error occurred during processing.


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.