prelude-error

prelude-error

Functions

Types and Values

Description

Functions

prelude_error_get_code ()

prelude_error_code_t
prelude_error_get_code (prelude_error_t error);

Parameters

error

A prelude_error_t return value.

 

Returns

the prelude_code_t code contained within the prelude_error_t integer.


prelude_error_get_source ()

prelude_error_source_t
prelude_error_get_source (prelude_error_t error);

Parameters

error

A prelude_error_t return value.

 

Returns

the prelude_source_t source contained within the prelude_error_t integer.


prelude_perror ()

void
prelude_perror (prelude_error_t error,
                const char *fmt);

Print the error to stderr, or to syslog() in case stderr is unavailable.

Parameters

error

A prelude_error_t return value.

 

fmt

Format string.

 

...

Argument list.

 

prelude_strerror ()

const char *
prelude_strerror (prelude_error_t err);

prelude_strsource ()

const char *
prelude_strsource (prelude_error_t err);

prelude_error_code_from_errno ()

prelude_error_code_t
prelude_error_code_from_errno (int err);

Parameters

err

errno value.

 

Returns

the prelude_error_code_t value corresponding to err .


prelude_error_make ()

prelude_error_t
prelude_error_make (prelude_error_source_t source,
                    prelude_error_code_t code);

Create a new prelude_error_t error using source and code .

Parameters

source

Error source.

 

code

Error code.

 

Returns

The created prelude_error_t integer.


prelude_error_make_from_errno ()

prelude_error_t
prelude_error_make_from_errno (prelude_error_source_t source,
                               int err);

Create a new prelude_error_t error using source and errno .

Parameters

source

Error source.

 

err

errno value.

 

Returns

The created prelude_error_t integer.


prelude_error_verbose_make ()

prelude_error_t
prelude_error_verbose_make (prelude_error_source_t source,
                            prelude_error_code_t code,
                            const char *fmt);

Create a new error using source and code , using the detailed error message specified within fmt .

Parameters

source

Error source.

 

code

Error code.

 

fmt

Format string.

 

...

Argument list.

 

Returns

The created prelude_error_t integer.


prelude_error_verbose_make_v ()

prelude_error_t
prelude_error_verbose_make_v (prelude_error_source_t source,
                              prelude_error_code_t code,
                              const char *fmt);

Create a new error using source and code , using the detailed error message specified within fmt .

Parameters

source

Error source.

 

code

Error code.

 

fmt

Format string.

 

ap

Argument list.

 

Returns

The created prelude_error_t integer.


prelude_error_code_to_errno ()

int
prelude_error_code_to_errno (prelude_error_code_t code);

Parameters

code

Error code.

 

Returns

the errno value corresponding to code .


prelude_error_is_verbose ()

prelude_bool_t
prelude_error_is_verbose (prelude_error_t error);

Parameters

error

A prelude_error_t return value.

 

Returns

PRELUDE_BOOL_TRUE if there is a detailed message for this error, PRELUDE_BOOL_FALSE otherwise.

Types and Values

PRELUDE_ERROR_SOURCE_DEFAULT

 #define PRELUDE_ERROR_SOURCE_DEFAULT  PRELUDE_ERROR_SOURCE_UNKNOWN

PRELUDE_ERROR_SYSTEM_ERROR

#define PRELUDE_ERROR_SYSTEM_ERROR    (1 << 15)

enum prelude_error_source_t

Members

PRELUDE_ERROR_SOURCE_UNKNOWN

   

PRELUDE_ERROR_SOURCE_IO

   

PRELUDE_ERROR_SOURCE_MESSAGE

   

PRELUDE_ERROR_SOURCE_FAILOVER

   

PRELUDE_ERROR_SOURCE_CLIENT

   

PRELUDE_ERROR_SOURCE_CLIENT_PROFILE

   

PRELUDE_ERROR_SOURCE_EXTRACT

   

PRELUDE_ERROR_SOURCE_CONNECTION

   

PRELUDE_ERROR_SOURCE_CONNECTION_POOL

   

PRELUDE_ERROR_SOURCE_CONFIG_ENGINE

   

PRELUDE_ERROR_SOURCE_STRING

   

PRELUDE_ERROR_SOURCE_IDMEF_TREE_WRAP

   

PRELUDE_ERROR_SOURCE_IDMEF_PATH

   

PRELUDE_ERROR_SOURCE_IDMEF_TYPE

   

PRELUDE_ERROR_SOURCE_IDMEF_MESSAGE_READ

   

PRELUDE_ERROR_SOURCE_IDMEF_CRITERIA

   

PRELUDE_ERROR_SOURCE_IDMEF_VALUE_TYPE

   

PRELUDE_ERROR_SOURCE_PRELUDEDB

   

enum prelude_error_code_t

Members

PRELUDE_ERROR_NO_ERROR

   

PRELUDE_ERROR_GENERIC

   

PRELUDE_ERROR_TLS

   

PRELUDE_ERROR_INVAL_LENGTH

   

PRELUDE_ERROR_INVAL_MESSAGE

   

PRELUDE_ERROR_PROTOCOL_VERSION

   

PRELUDE_ERROR_EOF

   

PRELUDE_ERROR_PROFILE

   

PRELUDE_ERROR_TLS_AUTH_REJECTED

   

PRELUDE_ERROR_INVAL_INT8

   

PRELUDE_ERROR_INVAL_INT16

   

PRELUDE_ERROR_INVAL_INT32

   

PRELUDE_ERROR_INVAL_INT64

   

PRELUDE_ERROR_INVAL_FLOAT

   

PRELUDE_ERROR_INVAL_CHAR

   

PRELUDE_ERROR_INVAL_IDMEF_TIME

   

PRELUDE_ERROR_CONNECTION_STRING

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_UNKNOWN

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_COPY_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_CLONE_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_READ_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_WRITE_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_COMPARE_MISMATCH

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_PARSE

   

PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN

   

PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_CHILD

   

PRELUDE_ERROR_IDMEF_CLASS_UNKNOWN_NAME

   

PRELUDE_ERROR_IDMEF_PATH_LENGTH

   

PRELUDE_ERROR_IDMEF_PATH_DEPTH

   

PRELUDE_ERROR_IDMEF_PATH_PARENT_ROOT

   

PRELUDE_ERROR_IDMEF_PATH_NTH

   

PRELUDE_ERROR_IDMEF_PATH_MISS_INDEX

   

PRELUDE_ERROR_IDMEF_PATH_INTEGRITY

   

PRELUDE_ERROR_IDMEF_PATH_INDEX_RESERVED

   

PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN

   

PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED

   

PRELUDE_ERROR_IDMEF_TREE_INDEX_UNDEFINED

   

PRELUDE_ERROR_IDMEF_UNKNOWN_ENUM_STRING

   

PRELUDE_ERROR_IDMEF_UNKNOWN_TAG

   

PRELUDE_ERROR_DAEMONIZE_LOCK_HELD

   

PRELUDE_ERROR_PLUGIN_LTDL_INIT

   

PRELUDE_ERROR_STRING_NOT_NULL_TERMINATED

   

PRELUDE_ERROR_CANT_RESOLVE

   

PRELUDE_ERROR_UNKNOWN_PERMISSION_TYPE

   

PRELUDE_ERROR_UNKNOWN_PERMISSION_BIT

   

PRELUDE_ERROR_IDMEF_CRITERIA_PARSE

   

PRELUDE_ERROR_IDMEF_CRITERION_UNSUPPORTED_OPERATOR

   

PRELUDE_ERROR_IDMEF_CRITERION_INVALID_REGEX

   

PRELUDE_ERROR_TLS_WARNING_ALERT

   

PRELUDE_ERROR_TLS_FATAL_ALERT

   

PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_CLASS

   

PRELUDE_ERROR_ASSERTION

   

PRELUDE_ERROR_IDMEF_VALUE_TYPE_REF_UNAVAILABLE

   

PRELUDE_ERROR_IDMEF_CLASS_CHILD_NOT_UNION

   

PRELUDE_ERROR_UNKNOWN_ERRNO

   

PRELUDE_ERROR_E2BIG

   

PRELUDE_ERROR_EACCES

   

PRELUDE_ERROR_EADDRINUSE

   

PRELUDE_ERROR_EADDRNOTAVAIL

   

PRELUDE_ERROR_EADV

   

PRELUDE_ERROR_EAFNOSUPPORT

   

PRELUDE_ERROR_EAGAIN

   

PRELUDE_ERROR_EALREADY

   

PRELUDE_ERROR_EAUTH

   

PRELUDE_ERROR_EBACKGROUND

   

PRELUDE_ERROR_EBADE

   

PRELUDE_ERROR_EBADF

   

PRELUDE_ERROR_EBADFD

   

PRELUDE_ERROR_EBADMSG

   

PRELUDE_ERROR_EBADR

   

PRELUDE_ERROR_EBADRPC

   

PRELUDE_ERROR_EBADRQC

   

PRELUDE_ERROR_EBADSLT

   

PRELUDE_ERROR_EBFONT

   

PRELUDE_ERROR_EBUSY

   

PRELUDE_ERROR_ECANCELED

   

PRELUDE_ERROR_ECHILD

   

PRELUDE_ERROR_ECHRNG

   

PRELUDE_ERROR_ECOMM

   

PRELUDE_ERROR_ECONNABORTED

   

PRELUDE_ERROR_ECONNREFUSED

   

PRELUDE_ERROR_ECONNRESET

   

PRELUDE_ERROR_ED

   

PRELUDE_ERROR_EDEADLK

   

PRELUDE_ERROR_EDEADLOCK

   

PRELUDE_ERROR_EDESTADDRREQ

   

PRELUDE_ERROR_EDIED

   

PRELUDE_ERROR_EDOM

   

PRELUDE_ERROR_EDOTDOT

   

PRELUDE_ERROR_EDQUOT

   

PRELUDE_ERROR_EEXIST

   

PRELUDE_ERROR_EFAULT

   

PRELUDE_ERROR_EFBIG

   

PRELUDE_ERROR_EFTYPE

   

PRELUDE_ERROR_EGRATUITOUS

   

PRELUDE_ERROR_EGREGIOUS

   

PRELUDE_ERROR_EHOSTDOWN

   

PRELUDE_ERROR_EHOSTUNREACH

   

PRELUDE_ERROR_EIDRM

   

PRELUDE_ERROR_EIEIO

   

PRELUDE_ERROR_EILSEQ

   

PRELUDE_ERROR_EINPROGRESS

   

PRELUDE_ERROR_EINTR

   

PRELUDE_ERROR_EINVAL

   

PRELUDE_ERROR_EIO

   

PRELUDE_ERROR_EISCONN

   

PRELUDE_ERROR_EISDIR

   

PRELUDE_ERROR_EISNAM

   

PRELUDE_ERROR_EL2HLT

   

PRELUDE_ERROR_EL2NSYNC

   

PRELUDE_ERROR_EL3HLT

   

PRELUDE_ERROR_EL3RST

   

PRELUDE_ERROR_ELIBACC

   

PRELUDE_ERROR_ELIBBAD

   

PRELUDE_ERROR_ELIBEXEC

   

PRELUDE_ERROR_ELIBMAX

   

PRELUDE_ERROR_ELIBSCN

   

PRELUDE_ERROR_ELNRNG

   

PRELUDE_ERROR_ELOOP

   

PRELUDE_ERROR_EMEDIUMTYPE

   

PRELUDE_ERROR_EMFILE

   

PRELUDE_ERROR_EMLINK

   

PRELUDE_ERROR_EMSGSIZE

   

PRELUDE_ERROR_EMULTIHOP

   

PRELUDE_ERROR_ENAMETOOLONG

   

PRELUDE_ERROR_ENAVAIL

   

PRELUDE_ERROR_ENEEDAUTH

   

PRELUDE_ERROR_ENETDOWN

   

PRELUDE_ERROR_ENETRESET

   

PRELUDE_ERROR_ENETUNREACH

   

PRELUDE_ERROR_ENFILE

   

PRELUDE_ERROR_ENOANO

   

PRELUDE_ERROR_ENOBUFS

   

PRELUDE_ERROR_ENOCSI

   

PRELUDE_ERROR_ENODATA

   

PRELUDE_ERROR_ENODEV

   

PRELUDE_ERROR_ENOENT

   

PRELUDE_ERROR_ENOEXEC

   

PRELUDE_ERROR_ENOLCK

   

PRELUDE_ERROR_ENOLINK

   

PRELUDE_ERROR_ENOMEDIUM

   

PRELUDE_ERROR_ENOMEM

   

PRELUDE_ERROR_ENOMSG

   

PRELUDE_ERROR_ENONET

   

PRELUDE_ERROR_ENOPKG

   

PRELUDE_ERROR_ENOPROTOOPT

   

PRELUDE_ERROR_ENOSPC

   

PRELUDE_ERROR_ENOSR

   

PRELUDE_ERROR_ENOSTR

   

PRELUDE_ERROR_ENOSYS

   

PRELUDE_ERROR_ENOTBLK

   

PRELUDE_ERROR_ENOTCONN

   

PRELUDE_ERROR_ENOTDIR

   

PRELUDE_ERROR_ENOTEMPTY

   

PRELUDE_ERROR_ENOTNAM

   

PRELUDE_ERROR_ENOTSOCK

   

PRELUDE_ERROR_ENOTSUP

   

PRELUDE_ERROR_ENOTTY

   

PRELUDE_ERROR_ENOTUNIQ

   

PRELUDE_ERROR_ENXIO

   

PRELUDE_ERROR_EOPNOTSUPP

   

PRELUDE_ERROR_EOVERFLOW

   

PRELUDE_ERROR_EPERM

   

PRELUDE_ERROR_EPFNOSUPPORT

   

PRELUDE_ERROR_EPIPE

   

PRELUDE_ERROR_EPROCLIM

   

PRELUDE_ERROR_EPROCUNAVAIL

   

PRELUDE_ERROR_EPROGMISMATCH

   

PRELUDE_ERROR_EPROGUNAVAIL

   

PRELUDE_ERROR_EPROTO

   

PRELUDE_ERROR_EPROTONOSUPPORT

   

PRELUDE_ERROR_EPROTOTYPE

   

PRELUDE_ERROR_ERANGE

   

PRELUDE_ERROR_EREMCHG

   

PRELUDE_ERROR_EREMOTE

   

PRELUDE_ERROR_EREMOTEIO

   

PRELUDE_ERROR_ERESTART

   

PRELUDE_ERROR_EROFS

   

PRELUDE_ERROR_ERPCMISMATCH

   

PRELUDE_ERROR_ESHUTDOWN

   

PRELUDE_ERROR_ESOCKTNOSUPPORT

   

PRELUDE_ERROR_ESPIPE

   

PRELUDE_ERROR_ESRCH

   

PRELUDE_ERROR_ESRMNT

   

PRELUDE_ERROR_ESTALE

   

PRELUDE_ERROR_ESTRPIPE

   

PRELUDE_ERROR_ETIME

   

PRELUDE_ERROR_ETIMEDOUT

   

PRELUDE_ERROR_ETOOMANYREFS

   

PRELUDE_ERROR_ETXTBSY

   

PRELUDE_ERROR_EUCLEAN

   

PRELUDE_ERROR_EUNATCH

   

PRELUDE_ERROR_EUSERS

   

PRELUDE_ERROR_EWOULDBLOCK

   

PRELUDE_ERROR_EXDEV

   

PRELUDE_ERROR_EXFULL

   

prelude_error_t

typedef signed int prelude_error_t;