Device Error Codes
Device functions use a unified set of error codes defined in
device.h.
The LayGO error code on the basis of which a device
error code is given can be retrieved by calling
dev_GetLastError().
- dev_ERROR_ATTACH_FAILURE
- lgo_Attach() returned an error.
- dev_ERROR_CANNOT_OPEN_DATABASE
- The device database could not be found or could not be opened for reading.
- dev_ERROR_CONNECT_FAILURE
- At least one layer in the device failed to connect or an attempt to accept a
connect request failed.
- dev_ERROR_DETACH_FAILURE
- lgo_Detach() returned an error.
- dev_ERROR_DEVICE_CONSTRUCTION_FAILURE
- lgo_Push() returned an error in dev_Open().
- dev_ERROR_DEVICE_NOT_BLOCKED
- All of the layers below the top layer are in data transfer state.
- dev_ERROR_DEVICE_NOT_CONNECTED
- The function called assumes that the device has been connected, but it has not or
the device is still in listening state;
- dev_ERROR_DEVICE_NOT_DISCONNECTED
- The function called assumes that the device has been disconnected, but it has not.
- dev_ERROR_DEVICE_NOT_FOUND
- The named device was not found in the device database.
- dev_ERROR_DEVICE_NOT_LISTENING
- The function called assumes that the device is listening, but it is not.
- dev_ERROR_DEVICE_NOT_OPEN
- The function called assumes that the device has been opened, but it has not been.
- dev_ERROR_DISCONNECT_FAILURE
- At least one layer in the device failed to disconnect.
- dev_ERROR_INTERNAL
- An internal error has occurred in the library. This
indicates an unexpected condition was encountered.
- dev_ERROR_INVALID_CID
- A CID in the device is invalid. This indicates an internal error.
- dev_ERROR_INVALID_DEVICE
- The device id given is
NULL
or the device definition given in the device database is invalid.
- dev_ERROR_INVALID_PARAMETER
- A parameter to dev_New() is
NULL
.
- dev_ERROR_LISTEN_FAILURE
- lgo_Listen() failed on at least one layer.
- dev_ERROR_MULTIPLEX_DEVICE
- The device is multiplexed and does not contain a read/write CID or
cannot be closed because minor devices remain open.
- dev_ERROR_NO_PROTOCOL_IN_DEVICE
- No layer with the given protocol id exists in the device.
- dev_ERROR_OUT_OF_MEMORY
- A request for memory was denied. The ability to recover
from this condition is questionable.
- dev_ERROR_REOPEN_FAILURE
- lgo_Reopen() returned an error.
- dev_ERROR_SERVICE_OPEN_FAILURE
- lgo_Open() returned an error in dev_Open().
- dev_ERROR_TEMPORARY_BLOCK
- The device cannot be unblocked at this time.
- dev_ERROR_UNBLOCK_FAILURE
- The device could not be unblocked.