FFError

FFError — Class for handling errors.

Synopsis


#include <ff-error.h>


struct      FFError;

FFError*    ff_error_new                    (void);
FFError*    ff_error_new_initialized        (ISC_STATUS *status);
void        ff_error_free                   (FFError *self);

glong       ff_error_get_number             (FFError *self);
void        ff_error_set_number             (FFError *self,
                                             glong error_number);
const gchar* ff_error_get_description       (FFError *self);
void        ff_error_set_description        (FFError *self,
                                             const gchar *description);
const gchar* ff_error_get_sqldescription    (FFError *self);
void        ff_error_set_sqldescription     (FFError *self,
                                             const gchar *description);
const gchar* ff_error_get_message           (FFError *self);
void        ff_error_set_message            (FFError *self,
                                             const gchar *message);

Description

Error objects are usually used as parameters in error handlers.

Details

struct FFError

struct FFError;


ff_error_new ()

FFError*    ff_error_new                    (void);

Constructor for FFError class.

Returns : A new FFError.

ff_error_new_initialized ()

FFError*    ff_error_new_initialized        (ISC_STATUS *status);

Constructor for FFError class. Creates an error object and set properties from status vector.

status : A pointer to a Firebird ISC_STATUS.
Returns : A new FFError.

ff_error_free ()

void        ff_error_free                   (FFError *self);

Destructor for FFError class.

self : A FFError.

ff_error_get_number ()

glong       ff_error_get_number             (FFError *self);

Returns Firebird error number.

self : A FFError.
Returns : A glong with error number or -1 no SQL error.

ff_error_set_number ()

void        ff_error_set_number             (FFError *self,
                                             glong error_number);

Set Firebird error number.

self : A FFError.
error_number : A Firebird error number.

ff_error_get_description ()

const gchar* ff_error_get_description       (FFError *self);

Get Firebird error message.

self : A FFError.
Returns : A string with description of error.

ff_error_set_description ()

void        ff_error_set_description        (FFError *self,
                                             const gchar *description);

Set Firebird error message.

self : A FFError.
description : A string containing error description.

ff_error_get_sqldescription ()

const gchar* ff_error_get_sqldescription    (FFError *self);

Get Firebird SQL error message.

self : A FFError.
Returns : A string with description of SQL error message.

ff_error_set_sqldescription ()

void        ff_error_set_sqldescription     (FFError *self,
                                             const gchar *description);

Set Firebird SQL error message.

self : A FFError.
description : A string containing SQL error description.

ff_error_get_message ()

const gchar* ff_error_get_message           (FFError *self);

Get self message.

self : A FFError.
Returns : A string containing error message.

ff_error_set_message ()

void        ff_error_set_message            (FFError *self,
                                             const gchar *message);

Set self message.

Return: A string containing error message.

self : A FFError.
message : A string containing error message.