CpgCompileError

CpgCompileError — Compile error message container

Synopsis


#include <cpg-network/cpg-compile-error.h>

#define             CPG_COMPILE_ERROR_TYPE
enum                CpgCompileErrorCode;
                    CpgCompileError;
CpgCompileError *   cpg_compile_error_new               ();
void                cpg_compile_error_set               (CpgCompileError *error,
                                                         GError *gerror,
                                                         CpgObject *object,
                                                         CpgProperty *property,
                                                         CpgLinkAction *action);
GError *            cpg_compile_error_get_error         (CpgCompileError *error);
CpgObject *         cpg_compile_error_get_object        (CpgCompileError *error);
CpgProperty *       cpg_compile_error_get_property      (CpgCompileError *error);
CpgLinkAction *     cpg_compile_error_get_link_action   (CpgCompileError *error);
const gchar *       cpg_compile_error_string            (CpgCompileError *error);
const gchar *       cpg_compile_error_code_string       (gint code);
gint                cpg_compile_error_get_code          (CpgCompileError *error);
const gchar *       cpg_compile_error_get_message       (CpgCompileError *error);

Description

Object used to store information on expression compile errors.

Details

CPG_COMPILE_ERROR_TYPE

#define CPG_COMPILE_ERROR_TYPE (cpg_compile_error_type_quark ())


enum CpgCompileErrorCode

typedef enum {
	CPG_COMPILE_ERROR_PROPERTY_NOT_FOUND,
	CPG_COMPILE_ERROR_FUNCTION_NOT_FOUND,
	CPG_COMPILE_ERROR_INVALID_TOKEN,
	CPG_COMPILE_ERROR_MAXARG,
	CPG_COMPILE_ERROR_INVALID_STACK,
	CPG_COMPILE_ERROR_NUM_ERRORS 
} CpgCompileErrorCode;

Enum used to indicate the type of compile error

CPG_COMPILE_ERROR_PROPERTY_NOT_FOUND

property not found

CPG_COMPILE_ERROR_FUNCTION_NOT_FOUND

function not found

CPG_COMPILE_ERROR_INVALID_TOKEN

invalid token

CPG_COMPILE_ERROR_MAXARG

maximum number of arguments exceeded

CPG_COMPILE_ERROR_INVALID_STACK

invalid stack produced

CPG_COMPILE_ERROR_NUM_ERRORS

num errors

CpgCompileError

typedef struct _CpgCompileError CpgCompileError;


cpg_compile_error_new ()

CpgCompileError *   cpg_compile_error_new               ();

Create new empty compile error

Returns :

a new CpgCompileError

cpg_compile_error_set ()

void                cpg_compile_error_set               (CpgCompileError *error,
                                                         GError *gerror,
                                                         CpgObject *object,
                                                         CpgProperty *property,
                                                         CpgLinkAction *action);

error :

gerror :

object :

property :

action :


cpg_compile_error_get_error ()

GError *            cpg_compile_error_get_error         (CpgCompileError *error);

Get the associated GError

error :

a CpgCompileError

Returns :

the associated GError

cpg_compile_error_get_object ()

CpgObject *         cpg_compile_error_get_object        (CpgCompileError *error);

Get the associated CpgObject

error :

a CpgCompileError

Returns :

the associated CpgObject

cpg_compile_error_get_property ()

CpgProperty *       cpg_compile_error_get_property      (CpgCompileError *error);

Get the associated CpgProperty

error :

a CpgCompileError

Returns :

the associated CpgProperty

cpg_compile_error_get_link_action ()

CpgLinkAction *     cpg_compile_error_get_link_action   (CpgCompileError *error);

Get the associated CpgLinkAction

error :

a CpgCompileError

Returns :

the associated CpgLinkAction

cpg_compile_error_string ()

const gchar *       cpg_compile_error_string            (CpgCompileError *error);

Get the string describing error

error :

a CpgCompileError

Returns :

the error string message

cpg_compile_error_code_string ()

const gchar *       cpg_compile_error_code_string       (gint code);

Get the string describing an error with error code error

code :

the error code

Returns :

the error string message

cpg_compile_error_get_code ()

gint                cpg_compile_error_get_code          (CpgCompileError *error);

Get the error code

error :

a CpgCompileError

Returns :

the error code

cpg_compile_error_get_message ()

const gchar *       cpg_compile_error_get_message       (CpgCompileError *error);

Get the error message

error :

a CpgCompileError

Returns :

the error message