forked from goma/brkfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheh.c
37 lines (32 loc) · 1.21 KB
/
eh.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/************************************************************************ *
* Goma - Multiphysics finite element software *
* Sandia National Laboratories *
* *
* Copyright (c) 2014 Sandia Corporation. *
* *
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, *
* the U.S. Government retains certain rights in this software. *
* *
* This software is distributed under the GNU General Public License. *
\************************************************************************/
/* eh -- error handling routine that puts out filename and linenumber*/
#include <stdio.h>
#define _EH_C
#include "std.h"
#include "eh.h"
#include <stdlib.h>
void eh(const int error_flag,
const char *file,
const int line,
const char *message)
{
if ( error_flag == -1 )
{
fprintf(stderr, "%s:%d: %s\n", file, line, message);
exit(-1);
}
else
{
return;
}
}