54#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
55# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
58#ifndef PLIBSYS_HEADER_PERROR_H
59#define PLIBSYS_HEADER_PERROR_H
87 const pchar *message);
144 const pchar *message);
162 const pchar *message);
189 const pchar *message);
P_LIB_API pint p_error_get_code(const PError *error)
Gets an error code.
P_LIB_API PError * p_error_new_literal(pint code, pint native_code, const pchar *message)
Initializes a new PError with data.
P_LIB_API void p_error_set_message(PError *error, const pchar *message)
Sets an error message.
P_LIB_API void p_error_set_last_net(pint code)
Sets the last network native error code.
P_LIB_API void p_error_set_code(PError *error, pint code)
Sets an error code.
struct PError_ PError
Opaque data structure for an error object.
P_LIB_API PError * p_error_new(void)
Initializes a new empty PError.
P_LIB_API pint p_error_get_last_system(void)
Gets the last system native error code.
P_LIB_API void p_error_set_error(PError *error, pint code, pint native_code, const pchar *message)
Sets error data.
P_LIB_API pint p_error_get_native_code(const PError *error)
Gets a platform native error code, if any.
P_LIB_API void p_error_set_error_p(PError **error, pint code, pint native_code, const pchar *message)
Sets error data through a double pointer.
P_LIB_API PError * p_error_copy(const PError *error)
Creates a copy of a PError object.
P_LIB_API void p_error_set_native_code(PError *error, pint native_code)
Sets a platform native error code.
P_LIB_API PErrorDomain p_error_get_domain(const PError *error)
Gets an error domain.
P_LIB_API pint p_error_get_last_net(void)
Gets the last network native error code.
P_LIB_API void p_error_free(PError *error)
Frees a previously initialized error object.
P_LIB_API void p_error_set_last_system(pint code)
Sets the last system native error code.
P_LIB_API void p_error_clear(PError *error)
Clears error data.
P_LIB_API const pchar * p_error_get_message(const PError *error)
Gets an error message.
enum PErrorDomain_ PErrorDomain
Enum with error domains.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
char pchar
Type for a char.