![]() |
![]() |
![]() |
libMirage Reference Manual | |
---|---|---|---|---|
Top | Description |
#include <mirage.h> enum MIRAGE_ErrorCodes; #define MIRAGE_ERROR GQuark mirage_error_quark (void); void mirage_error (gint errcode, GError **error);
libMirage uses GLib's GError system for reporting errors. Most functions provided
by libMirage's objects take an optional error
parameter. If error
is not NULL
,
in case that such function should fail, a GError error is set into it using
mirage_error()
.
Unless coming from underlying GLib's systems, the returned error code is one of MIRAGE_ErrorCodes.
typedef enum { /* General */ MIRAGE_E_INVALIDARG = 0xDEAD000, MIRAGE_E_NOTIMPL, MIRAGE_E_ITERCANCELLED, MIRAGE_E_INVALIDOBJTYPE, MIRAGE_E_DATANOTSET, MIRAGE_E_DATAFIXED, MIRAGE_E_NOTINLAYOUT, MIRAGE_E_INDEXOUTOFRANGE, MIRAGE_E_SECTOROUTOFRANGE, /* Mirage */ MIRAGE_E_NOTINIT, MIRAGE_E_PLUGINDIR, MIRAGE_E_NOPARSERFOUND, MIRAGE_E_NOFRAGMENTFOUND, MIRAGE_E_IMAGEFILE, /* Plugins */ MIRAGE_E_PARSER, MIRAGE_E_CANTHANDLE, MIRAGE_E_NEEDPASSWORD, MIRAGE_E_WRONGPASSWORD, MIRAGE_E_NOPASSWORD, /* Object */ MIRAGE_E_NODEBUGCONTEXT, MIRAGE_E_NOPARENT, /* Disc */ MIRAGE_E_SESSIONNOTFOUND, MIRAGE_E_SESSIONEXISTS, MIRAGE_E_INVALIDMEDIUM, /* Session */ MIRAGE_E_TRACKNOTFOUND, MIRAGE_E_LANGNOTFOUND, MIRAGE_E_TRACKEXISTS, MIRAGE_E_LANGEXISTS, /* Track */ MIRAGE_E_INDEXNOTFOUND, MIRAGE_E_FRAGMENTNOTFOUND, /* Fragment */ MIRAGE_E_FILENOTSET, MIRAGE_E_READFAILED, MIRAGE_E_DATAFILE, /* Sector */ MIRAGE_E_SECTORTYPE, /* Language */ MIRAGE_E_INVALIDPACKTYPE, MIRAGE_E_PACKNOTSET, MIRAGE_E_GENERIC = 0xDEADFFF, } MIRAGE_ErrorCodes;
Error codes for libMirage library.
invalid argument | |
not implemented | |
iteration cancelled | |
invalid object type | |
requested data is not set | |
data is fixed and cannot be altered | |
object is not part of the layout | |
requested index is out of range | |
requested sector is out of range | |
libMirage not initialized | |
failed to open plugin directory | |
no parser can handle given image | |
no parser can handle given data | |
image file cannot be opened or read | |
parser error | |
parser cannot handle given image file(s) | |
image is encrypted and requires password | |
wrong password | |
no password provided | |
debug context is not set | |
parent object is not set | |
session not found | |
session already exists | |
invalid medium type | |
track not found | |
language not found | |
track already exists | |
language already exists | |
index not found | |
fragment not found | |
file is not set | |
read has failed | |
data file cannot be opened or read | |
invalid sector type | |
invalid pack type | |
pack of requested type is not set | |
generic libMirage error |
#define MIRAGE_ERROR mirage_error_quark()
Used to get the GError quark for libMirage errors.
GQuark mirage_error_quark (void);
Registers an error quark for libMirage if necessary.
Returns : |
The error quark used for libMirage errors. |
void mirage_error (gint errcode, GError **error);
Sets error code and error string for error error
code to GError stored
in error
. If error
is already set, it is freed before being set. If error
is NULL
, this function does nothing.
|
error code |
|
location to store error, or NULL
|