manpagez: man pages & more
info gdbm
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

19 Error codes

This chapter summarizes the error codes which can be set by the functions in gdbm library.

GDBM_NO_ERROR

No error occurred.

GDBM_MALLOC_ERROR

Memory allocation failed. Not enough memory.

GDBM_BLOCK_SIZE_ERROR

This error is set by the gdbm_open function (see section Opening the database.), if the value of its block_size argument is incorrect.

GDBM_FILE_OPEN_ERROR

The library was not able to open a disk file. This can be set by gdbm_open (see section Opening the database.), gdbm_export and gdbm_import functions (see section Export and Import).

Inspect the value of the system errno variable to get more detailed diagnostics.

GDBM_FILE_WRITE_ERROR

Writing to a disk file failed. This can be set by gdbm_open (see section Opening the database.), gdbm_export and gdbm_import functions.

Inspect the value of the system errno variable to get more detailed diagnostics.

GDBM_FILE_SEEK_ERROR

Positioning in a disk file failed. This can be set by gdbm_open (see section Opening the database.) function.

Inspect the value of the system errno variable to get a more detailed diagnostics.

GDBM_FILE_READ_ERROR

Reading from a disk file failed. This can be set by gdbm_open (see section Opening the database.), gdbm_export and gdbm_import functions.

Inspect the value of the system errno variable to get a more detailed diagnostics.

GDBM_BAD_MAGIC_NUMBER

The file given as argument to gdbm_open function is not a valid gdbm file: it has a wrong magic number.

GDBM_EMPTY_DATABASE

The file given as argument to gdbm_open function is not a valid gdbm file: it has zero length.

GDBM_CANT_BE_READER

This error code is set by the gdbm_open function if it is not able to lock file when called in ‘GDBM_READER’ mode (see section GDBM_READER).

GDBM_CANT_BE_WRITER

This error code is set by the gdbm_open function if it is not able to lock file when called in writer mode (see section Opening the database.).

GDBM_READER_CANT_DELETE

Set by the gdbm_delete (see section Removing records from the database.) if it attempted to operate on a database that is open in read-only mode (see section GDBM_READER).

GDBM_READER_CANT_STORE

Set by the gdbm_store (see section Inserting and replacing records in the database.) if it attempted to operate on a database that is open in read-only mode (see section GDBM_READER).

GDBM_READER_CANT_REORGANIZE

Set by the gdbm_reorganize (see section Database reorganization.) if it attempted to operate on a database that is open in read-only mode (see section GDBM_READER).

GDBM_UNKNOWN_UPDATE

Currently unused. Reserved for future uses.

GDBM_ITEM_NOT_FOUND

Requested item was not found. This error is set by gdbm_delete (see section Removing records from the database.) and gdbm_fetch (see section Searching for records in the database.) when the requested key value is not found in the database.

GDBM_REORGANIZE_FAILED

The gdbm_reorganize function is not able to create a temporary database. See section Database reorganization..

GDBM_CANNOT_REPLACE

Cannot replace existing item. This error is set by the gdbm_store if the requested key value is found in the database and the flag parameter is not ‘GDBM_REPLACE’. See section Inserting and replacing records in the database., for a detailed discussion.

GDBM_ILLEGAL_DATA

Either key or content parameter was wrong in a call to to gdbm_store (see section Inserting and replacing records in the database.).

GDBM_OPT_ALREADY_SET

Requested option can be set only once and was already set. This error is returned by the gdbm_setopt function. See section GDBM_CACHESIZE.

GDBM_OPT_ILLEGAL

The option argument is not valid or the value argument points to an invalid value in a call to gdbm_setopt function. See section Setting options.

GDBM_BYTE_SWAPPED

The gdbm_open function (see section Opening the database.) attempts to open a database which is created on a machine with different byte ordering.

GDBM_BAD_FILE_OFFSET

The gdbm_open function (see section Opening the database.) sets this error code if the file it tries to open has a wrong magic number.

GDBM_BAD_OPEN_FLAGS

Set by the gdbm_export function if supplied an invalid flags argument. See section Export and Import.

GDBM_FILE_STAT_ERROR

Getting information about a disk file failed. The system errno will give more details about the error.

This error can be set by the following functions: gdbm_open, gdbm_reorganize.

GDBM_FILE_EOF

End of file was encountered where more data was expected to be present. This error can occur when fetching data from the database and usually means that the database is truncated or otherwise corrupted.

This error can be set by any GDBM function that does I/O. Some of these functions are: gdbm_delete, gdbm_exists, gdbm_fetch, gdbm_export, gdbm_import, gdbm_reorganize, gdbm_firstkey, gdbm_nextkey, gdbm_store.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on December 2, 2011 using texi2html 5.0.