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_last_net(void)
Gets the last network native error code.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS...
Definition: pmacros.h:299
P_LIB_API PError * p_error_copy(const PError *error)
Creates a copy of a PError object.
P_LIB_API PErrorDomain p_error_get_domain(const PError *error)
Gets an error domain.
P_LIB_API void p_error_free(PError *error)
Frees a previously initialized error object.
P_LIB_API PError * p_error_new_literal(pint code, pint native_code, const pchar *message)
Initializes a new PError with data.
int pint
Type for an int.
Definition: ptypes.h:120
char pchar
Type for a char.
Definition: ptypes.h:116
P_LIB_API const pchar * p_error_get_message(const PError *error)
Gets an error message.
P_LIB_API void p_error_set_code(PError *error, pint code)
Sets an error code.
typedefP_BEGIN_DECLS struct PError_ PError
Opaque data structure for an error object.
Definition: perror.h:68
P_LIB_API pint p_error_get_code(const PError *error)
Gets an error code.
P_LIB_API pint p_error_get_last_system(void)
Gets the last system native error code.
P_LIB_API void p_error_set_last_system(pint code)
Sets the last system native error code.
P_LIB_API PError * p_error_new(void)
Initializes a new empty PError.
P_LIB_API void p_error_clear(PError *error)
Clears error data.
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.
#define P_LIB_API
Exports a symbol from a shared library.
Definition: pmacros.h:138
P_BEGIN_DECLS enum PErrorDomain_ PErrorDomain
Enum with error domains.
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_message(PError *error, const pchar *message)
Sets an error message.
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.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
Definition: pmacros.h:298
P_LIB_API void p_error_set_native_code(PError *error, pint native_code)
Sets a platform native error code.