Loading...
Searching...
No Matches
handler.c File Reference

GIS Library - Error handlers. More...

`#include <stddef.h>`
`#include <grass/gis.h>`
Include dependency graph for 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.
void | G_remove_error_handler (void(*func)(void *), void *closure)
| Remove existing error handler.
void | G__call_error_handlers (void)
| Call available error handlers (internal use only).

## 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 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 handler.c.

Referenced by G_fatal_error().

## G_add_error_handler()

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

Add new error handler.

Example

static void error_handler(void *p) {
const char *map = (const char *) p;
Vect_delete(map);
}
G_add_error_handler(error_handler, new->answer);
G_add_error_handler
void G_add_error_handler(void(*func)(void *), void *closure)
Add new error handler.
Definition handler.c:71

Parameters

  func | handler to add
  closure | pointer to closure data

Definition at line 71 of file handler.c.

## G_remove_error_handler()

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

Remove existing error handler.

Parameters

  func | handler to be remove
  closure | pointer to closure data

Definition at line 85 of file handler.c.

References NULL.