vrpRouting  0.3
e_report.c
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: e_report.c
3 
4 Function's developer:
5 Copyright (c) 2016 Celia Virginia Vergara Castillo
7 
8 ------
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 
24  ********************************************************************PGR-GNU*/
25 
27 #include "c_common/e_report.h"
28 
29 void
31  char* log,
32  char* notice,
33  char* err) {
34  if (!notice && log) {
35  ereport(DEBUG1,
36  (errmsg_internal("%s", log)));
37  }
38 
39  if (notice) {
40  if (log) {
41  ereport(NOTICE,
42  (errmsg_internal("%s", notice),
43  errhint("%s", log)));
44  } else {
45  ereport(NOTICE,
46  (errmsg_internal("%s", notice)));
47  }
48  }
49 
50  if (err) {
51  if (log) {
52  ereport(ERROR,
53  (errmsg_internal("%s", err),
54  errhint("%s", log)));
55  } else {
56  ereport(ERROR,
57  (errmsg_internal("%s", err)));
58  }
59  }
60 }
postgres_connection.h
e_report.h
pgr_global_report
void pgr_global_report(char *log, char *notice, char *err)
notice & error
Definition: e_report.c:30