ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/slog.C
(Generate patch)

Comparing gvpe/src/slog.C (file contents):
Revision 1.1 by pcg, Sat Mar 1 15:53:03 2003 UTC vs.
Revision 1.3 by pcg, Thu Jan 29 18:55:10 2004 UTC

1/* 1/*
2 slog.C -- logging 2 slog.C -- logging
3 Copyright (C) 2003 Marc Lehmannn <pcg@goof.com> 3 Copyright (C) 2003 Marc Lehmann <pcg@goof.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
90} 90}
91 91
92void fatal (const char *m) 92void fatal (const char *m)
93{ 93{
94 slog (L_CRIT, m); 94 slog (L_CRIT, m);
95 exit (1); 95 exit (EXIT_FAILURE);
96} 96}
97 97
98extern void require_failed (const char *file, int line, const char *info)
99{
100 slog (L_CRIT, "FATAL: This program encountered a SHOULD NOT HAPPEN condition and will exit:");
101 slog (L_CRIT, "FATAL+ %s:%d '%s' is false", file, line, info);
102 slog (L_CRIT, "FATAL+ This might indicates a bug in this program, a bug in your libraries,");
103 slog (L_CRIT, "FATAL+ your system setup or operating system. Or it might indicate a very");
104 slog (L_CRIT, "FATAL+ unusual, unanticipated operating condition, library version mismatch");
105 slog (L_CRIT, "FATAL+ or similar problem. If it's not obvious to you what was causing it,");
106 slog (L_CRIT, "FATAL+ then please report this to the program author(s).");
107 exit (126);
108}
109

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines