LALApps 10.1.0.1-eeff03c
errutil.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Jolien Creighton
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#ifndef ERRUTIL_H
21#define ERRUTIL_H
22
23#include <lal/LALDatatypes.h>
24#include <lal/XLALError.h>
25
26/* global flag to abort on error (rather than just exit) */
27extern int abrtflg;
28
29/* global flag to print verbose messages */
30extern int vrbflg;
31
32/* print an error message and either exit or abort */
33int error( const char *fmt, ... );
34
35/* print an message if verbose messaging is turned on */
36int verbose( const char *fmt, ... );
37
38/* XLAL error handler to abort on error */
39void XLALAbortErrorHandler( const char *func, const char *file, int line,
40 int errnum );
41
42/* XLAL error handler to exit on error */
43void XLALExitErrorHandler( const char *func, const char *file, int line,
44 int errnum );
45
46/* set handlers to abort on error */
47void set_abrt_on_error( void );
48
49/* set handlers to exit on error */
50void set_exit_on_error( void );
51
52#endif /* ERRUTIL_H */
int abrtflg
Definition: errutil.c:32
int verbose(const char *fmt,...)
Definition: view.c:794
int error(const char *fmt,...)
Definition: errutil.c:37
void set_exit_on_error(void)
Definition: errutil.c:91
void set_abrt_on_error(void)
Definition: errutil.c:82
int vrbflg
defined in lal/lib/std/LALError.c
void XLALAbortErrorHandler(const char *func, const char *file, int line, int errnum)
void XLALExitErrorHandler(const char *func, const char *file, int line, int errnum)