![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum ExceptionId; struct CamelException; #define CAMEL_EXCEPTION_INITIALISER CamelException * camel_exception_new (void
); void camel_exception_free (CamelException *ex
); void camel_exception_init (CamelException *ex
); void camel_exception_clear (CamelException *ex
); void camel_exception_set (CamelException *ex
,ExceptionId id
,const gchar *desc
); void camel_exception_setv (CamelException *ex
,ExceptionId id
,const gchar *format
,...
); void camel_exception_xfer (CamelException *ex_dst
,CamelException *ex_src
); ExceptionId camel_exception_get_id (CamelException *ex
); const gchar * camel_exception_get_description (CamelException *ex
); #define camel_exception_is_set (ex)
struct CamelException { /* do not access the fields directly */ ExceptionId id; gchar *desc; };
void camel_exception_free (CamelException *ex
);
Free an exception object. If the exception is NULL
, nothing is
done, the routine simply returns.
|
a CamelException |
void camel_exception_init (CamelException *ex
);
Init an exception. This routine is mainly useful when using a statically allocated exception.
|
a CamelException |
void camel_exception_clear (CamelException *ex
);
Clear an exception, that is, set the exception ID to
CAMEL_EXCEPTION_NONE and free the description text. If the
exception is NULL
, this funtion just returns.
|
a CamelException |
void camel_exception_set (CamelException *ex
,ExceptionId id
,const gchar *desc
);
|
|
|
|
|
void camel_exception_setv (CamelException *ex
,ExceptionId id
,const gchar *format
,...
);
|
|
|
|
|
|
|
void camel_exception_xfer (CamelException *ex_dst
,CamelException *ex_src
);
Transfer the content of an exception from an exception object to another. The destination exception receives the id and the description text of the source exception.
|
Destination exception object |
|
Source exception object |
ExceptionId camel_exception_get_id (CamelException *ex
);
Get the id of an exception.
|
a CamelException |
Returns : |
the exception id (CAMEL_EXCEPTION_NONE will be returned if
ex is NULL or unset)
|
const gchar * camel_exception_get_description (CamelException *ex
);
Get the exception description text.
|
a CamelException |
Returns : |
the exception description text (NULL will be returned if
ex is NULL or unset)
|