vrpRouting  0.3
e_report.c File Reference
Include dependency graph for e_report.c:

Go to the source code of this file.

Functions

void pgr_global_report (char *log, char *notice, char *err)
 notice & error More...
 

Function Documentation

◆ pgr_global_report()

void pgr_global_report ( char *  log_msg,
char *  notice_msg,
char *  error_msg 
)

notice & error

pgr_notice(&log_msg, &notice_msg, &error_msg);
precondition: before calling ereport
assert(!*log_msg);
assert(!*notice_msg);
assert(!*error_msg);

Definition at line 30 of file e_report.c.

33  {
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 }

Referenced by process().