Next: Compatibility, Previous: Additional functions, Up: Top [Contents][Index]
This chapter summarizes error codes which can be set by the
functions in GDBM
library.
No error occurred.
Memory allocation failed. Not enough memory.
This error is set by the gdbm_open
function (see Open), if
the value of its block_size argument is incorrect and the
GDBM_BSEXACT
flag is set.
The library was not able to open a disk file. This can be set by
gdbm_open
(see Open), gdbm_dump
(gdbm_export
) and
gdbm_load
(gdbm_import
) functions (see Flat files).
Inspect the value of the system errno
variable to get more
detailed diagnostics.
Writing to a disk file failed. This can be set by
gdbm_open
(see Open), gdbm_dump
(gdbm_export
) and
gdbm_load
(gdbm_import
) functions.
Inspect the value of the system errno
variable to get more
detailed diagnostics.
Positioning in a disk file failed. This can be set by
gdbm_open
(see Open) function.
Inspect the value of the system errno
variable to get a more
detailed diagnostics.
Reading from a disk file failed. This can be set by
gdbm_open
(see Open), gdbm_dump
(gdbm_export
) and
gdbm_load
(gdbm_import
) functions.
Inspect the value of the system errno
variable to get a more
detailed diagnostics.
The file given as argument to gdbm_open
function is not a valid
GDBM
file: it has a wrong magic number.
The file given as argument to gdbm_open
function is not a valid
GDBM
file: it has zero length.
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 GDBM_READER).
This error code is set by the gdbm_open
function if it is not
able to lock file when called in writer mode (see Open).
Set by the gdbm_delete
(see Delete) if it attempted to
operate on a database that is open in read-only mode (see GDBM_READER).
Set by the gdbm_store
(see Store) if it attempted to
operate on a database that is open in read-only mode (see GDBM_READER).
Set by the gdbm_reorganize
(see Reorganization) if it attempted to
operate on a database that is open in read-only mode (see GDBM_READER).
Requested item was not found. This error is set by gdbm_delete
(see Delete) and gdbm_fetch
(see Fetch) when the requested
key value is not found in the database.
The gdbm_reorganize
function is not
able to create a temporary database. See Reorganization.
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 Store, for a detailed discussion.
Input data was malformed in some way. When returned by
gdbm_load
, this means that the input file was not a valid
GDBM
dump file (see gdbm_load function). When returned by
gdbm_store
, this means that either key or content
parameter had its dptr
field set to NULL
(see Store).
The GDBM_ILLEGAL_DATA
is an alias for this error code,
maintained for backward compatibility. Its use in modern applications
is discouraged.
Requested option can be set only once and was already set. As of
version 1.24, this error code is no longer used. In prior
versions it could have been returned by the gdbm_setopt
function when setting the GDBM_CACHESIZE
value.
The option argument is not valid or the value argument
points to an invalid value in a call to gdbm_setopt
function.
See Options.
GDBM_OPT_ILLEGAL
is an alias for this error code, maintained
for backward compatibility. Modern applications should not use it.
The gdbm_open
function (see Open) attempts to open a
database which is created on a machine with different byte ordering.
The gdbm_open
function (see Open) sets this error code if
the file it tries to open has a wrong magic number.
Set by the gdbm_dump
(gdbm_export
) function if supplied
an invalid flags argument. See Flat files.
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
.
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_dump
, gdbm_load
,
gdbm_export
, gdbm_import
, gdbm_reorganize
,
gdbm_firstkey
, gdbm_nextkey
, gdbm_store
.
Output database name is not specified. This error code is set by
gdbm_load
(see gdbm_load) if the first
argument points to NULL
and the input file does not specify the
database name.
This error code is set by gdbm_load
if it is unable to restore
database file owner. It is a mild error condition, meaning that the
data have been restored successfully, only changing the target file
owner failed. Inspect the system errno
variable to get a more
detailed diagnostics.
This error code is set by gdbm_load
if it is unable to restore
database file mode. It is a mild error condition, meaning that the data
have been restored successfully, only changing the target file owner
failed. Inspect the system errno
variable to get a more
detailed diagnostics.
Database is in inconsistent state and needs recovery. Call
gdbm_recover
if you get this error. See Recovery, for a
detailed description of recovery functions.
The GDBM engine is unable to create backup copy of the file.
Bucket directory would overflow the size limit during an attempt to split hash bucket. This error can occur while storing a new key.
Invalid index bucket is encountered in the database. Database recovery is needed (see Recovery).
This error is set by gdbm_open
and gdbm_fd_open
, if the
first block read from the database file does not contain a valid
GDBM
header.
The available space stack is invalid. This error can be set by
gdbm_open
and gdbm_fd_open
, if the extended database
verification was requested (GDBM_XVERIFY
). It is also set
by the gdbm_avail_verify
function (see Additional functions).
Database recovery is needed (see Recovery).
Hash table in a bucket is invalid. This error can be set by the
following functions: gdbm_delete
, gdbm_exists
,
gdbm_fetch
, gdbm_firstkey
, gdbm_nextkey
, and
gdbm_store
.
Database recovery is needed (see Recovery).
Bad directory entry found in the bucket. The database recovery is needed (see Recovery).
The gdbm_close
function was unable to close the database file
descriptor. The system errno
variable contains the
corresponding error code.
Cached content couldn’t be synchronized to disk. Examine the
errno
variable to get more info,
Database recovery is needed (see Recovery).
File cannot be truncated. Examine the errno
variable to get
more info.
This error is set by gdbm_open
and gdbm_fd_open
when
called with the GDBM_NEWDB
flag.
The bucket cache structure is corrupted. Database recovery is needed (see Recovery).
This error is set during sequential access (see Sequential), if the next hash table entry does not contain the expected key. This means that the bucket is malformed or corrupted and the database needs recovery (see Recovery).
Set by the gdbm_failure_atomic
function if it was unable to
clone the database file into a snapshot. Inspect the system
errno
variable for the underlying cause of the error. If
errno
is EINVAL
or ENOSYS
, crash tolerance
settings will be removed from the database.
See Crash Tolerance API.
Set by the gdbm_failure_atomic
function if the call to
realpath
function failed. realpath
is used to
determine actual path names of the snapshot files. Examine the system
errno
variable for details.
See Crash Tolerance API.
Function usage error. That includes invalid argument values, and the like.
Next: Compatibility, Previous: Additional functions, Up: Top [Contents][Index]