GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-bea8435a9e
gis/handler.c File Reference

GIS Library - Error handlers. More...

#include <stddef.h>
#include <grass/gis.h>
Include dependency graph for gis/handler.c:

Go to the source code of this file.

Functions

void G_add_error_handler (void(*func)(void *), void *closure)
 Add new error handler. More...
 
void G_remove_error_handler (void(*func)(void *), void *closure)
 Remove existing error handler. More...
 
void G__call_error_handlers (void)
 Call available error handlers (internal use only) More...
 

Detailed Description

GIS Library - Error handlers.

(C) 2010-2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Glynn Clements

Definition in file gis/handler.c.

Function Documentation

◆ G__call_error_handlers()

void G__call_error_handlers ( void  )

Call available error handlers (internal use only)

Definition at line 102 of file gis/handler.c.

◆ G_add_error_handler()

void G_add_error_handler ( void(*)(void *)  func,
void *  closure 
)

Add new error handler.

Example

static void error_handler(void *p) {
const char *map = (const char *) p;
}
G_add_error_handler(error_handler, new->answer);
void G_add_error_handler(void(*)(void *), void *)
Add new error handler.
Definition: gis/handler.c:71
int Vect_delete(const char *)
Delete vector map including attribute tables.
Definition: map.c:367
Parameters
funchandler to add
closurepointer to closure data

Definition at line 71 of file gis/handler.c.

Referenced by db_set_error_handler_driver().

◆ G_remove_error_handler()

void G_remove_error_handler ( void(*)(void *)  func,
void *  closure 
)

Remove existing error handler.

Parameters
funchandler to be remove
closurepointer to closure data

Definition at line 85 of file gis/handler.c.

Referenced by db_unset_error_handler_driver().