/[ascend]/trunk/base/generic/utilities/ascPanic.h
ViewVC logotype

Contents of /trunk/base/generic/utilities/ascPanic.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations) (download) (as text)
Tue Aug 2 11:20:09 2005 UTC (15 years, 2 months ago) by jds
File MIME type: text/x-chdr
File size: 3197 byte(s)
Manual rework of doxygen comments in all headers.
- Added @file comment to all headers.
- Added parameter names to all function declarations in headers.
- Corrected comment referencing where necessary.
- Split some comments which documented blocks of declarations.
- Converted notes about required work into @todo comments so doxygen can generate a todo list.
Minor bug fixes.
1 /*
2 * Ascend Panic
3 * by Mark Thomas
4 * Created: 1997.05.15
5 * Version: $Revision: 1.1 $
6 * Version control file: $RCSfile: ascPanic.h,v $
7 * Date last modified: $Date: 1997/07/18 11:43:23 $
8 * Last modified by: $Author: mthomas $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1997 Carnegie Mellon University
13 *
14 * The Ascend Language Interpreter is free software; you can redistribute
15 * it and/or modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * The Ascend Language Interpreter is distributed in hope that it will be
20 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with the program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27 * COPYING.
28 */
29
30 /** @file
31 * Ascend Panic - Fatal Error Handling.
32 * <pre>
33 * To include this header file, you must include the following:
34 * #include <stdarg.h>
35 * #include "utilities/ascConfig.h"
36 * #include "compiler/compiler.h"
37 * #include "compiler/ascPanic.h"
38 * </pre>
39 */
40
41 #ifndef _ASCPANIC_H
42 #define _ASCPANIC_H
43
44 /**
45 * <!-- Asc_Panic( status, function, format, args ) -->
46 * <!-- int status; -->
47 * <!-- CONST char *function -->
48 * <!-- CONST char *format -->
49 * <!-- VAR_ARGS args -->
50 *
51 * This function prints the arguments "args" using the format string
52 * "format" to the ASCERR file handle. The first line of the panic
53 * message will print ``ASCEND PANIC!! in function'' if the argument
54 * "function" is not NULL. If ASCERR has not been initialized to a
55 * valid file pointer, the message will not be printed. Either way,
56 * if an panic output file location has been specified with the
57 * Asc_PanicSetOutfile() function, the panic message is also stored
58 * there. Under Windows, we also pop up a MessageBox containing the
59 * message. Finally, we exit the program with the status "status".<br><br>
60 *
61 * Side Effects: Exits the program.
62 */
63 extern void Asc_Panic(CONST int status, CONST char *function,
64 CONST char *format, ...);
65
66 /**
67 * <!-- Asc_PanicSetOutfile(filename) -->
68 * <!-- CONST char *filename; -->
69 *
70 * Calling this function with a non-NULL "filename" will cause
71 * Asc_Panic() to write panic messages to "filename" in addition to the
72 * ASCERR file handle. Passing in a "filename" of NULL causes panic
73 * messages not to be written to disk---this undoes the effect of
74 * previous calls to Asc_PanicSetOutfile()
75 */
76 extern void Asc_PanicSetOutfile(CONST char *filename);
77
78 #endif /* _ASCPANIC_H */
79

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22