other versions
- wheezy 8.4.19-5
other sections
Tcl_Panic(3tcl) | Tcl Library Procedures | Tcl_Panic(3tcl) |
NAME¶
Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc, panic, panicVA - report fatal error and abortSYNOPSIS¶
#include <tcl.h>void Tcl_Panic(format, arg, arg, ...)void Tcl_PanicVA(format, argList)void Tcl_SetPanicProc(panicProc)void panic(format, arg, arg, ...)void panicVA(format, argList)
ARGUMENTS¶
- CONST char* format (in)
- A printf-style format string.
- arg (in)
- Arguments matching the format string.
- va_list argList (in)
- An argument list of arguments matching the format string. Must have been initialized using TCL_VARARGS_START, and cleared using va_end.
- Tcl_PanicProc *panicProc (in)
- Procedure to report fatal error message and abort.
DESCRIPTION¶
When the Tcl library detects that its internal data structures are in an inconsistent state, or that its C procedures have been called in a manner inconsistent with their documentation, it calls Tcl_Panic to display a message describing the error and abort the process. The format argument is a format string describing how to format the remaining arguments arg into an error message, according to the same formatting rules used by the printf family of functions. The same formatting rules are also used by the builtin Tcl command format. In a freshly loaded Tcl library, Tcl_Panic prints the formatted error message to the standard error file of the process, and then calls abort to terminate the process. Tcl_Panic does not return. Tcl_SetPanicProc may be used to modify the behavior of Tcl_Panic. The panicProc argument should match the type Tcl_PanicProc:typedef void Tcl_PanicProc( CONST char * format, arg, arg,...);
SEE ALSO¶
abort(3), printf(3), exec(3tcl), format(3tcl)KEYWORDS¶
abort, fatal, error8.4 | Tcl |