MobilityDB 1.3
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
error.c File Reference

MEOS error handling inspired by GEOS and Proj https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in https://github.com/OSGeo/PROJ/blob/master/src/4D_api.cpp. More...

#include <errno.h>
#include <stdarg.h>
#include <postgres.h>
#include <meos.h>

Typedefs

typedef void(* meos_error_handler_t) (int, int, const char *)
 Process-global error handler function. More...
 

Functions

void default_error_handler (int errlevel, int errcode, const char *errmsg)
 Default error handler function that prints the error message to stderr, sets the errcode, and exits if error level is equal to ERROR More...
 
void error_handler_errno (int errlevel, int errcode, const char *errmsg)
 Error handler function that sets the errcode and the error message. More...
 
int meos_errno (void)
 Read an error number. More...
 
int meos_errno_reset (void)
 Clears an error number. More...
 
int meos_errno_restore (int err)
 Set an error number. More...
 
int meos_errno_set (int err)
 Set an error number. More...
 
void meos_error (int errlevel, int errcode, const char *format,...)
 Function handling error messages. More...
 
void meos_initialize_error_handler (error_handler_fn err_handler)
 

Variables

static MEOS_TLS int MEOS_ERR_NO = 0
 Per-thread variable that keeps the last error number. More...
 
static meos_error_handler_t MEOS_ERROR_HANDLER = NULL
 

Detailed Description

MEOS error handling inspired by GEOS and Proj https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in https://github.com/OSGeo/PROJ/blob/master/src/4D_api.cpp.