{"id":7398,"date":"2022-12-20T19:37:56","date_gmt":"2022-12-20T22:37:56","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tcl_panic-man3-2\/"},"modified":"2022-12-20T19:37:56","modified_gmt":"2022-12-20T22:37:56","slug":"tcl_panic-man3-2","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tcl_panic-man3-2\/","title":{"rendered":"Tcl_Panic (man3)"},"content":{"rendered":"<h1 align=\"center\">Tcl_Panic<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#ARGUMENTS\">ARGUMENTS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc \u2212 report fatal error and abort<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <tcl.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_Panic<\/b>(<i>format<\/i>, <i>arg<\/i>, <i>arg<\/i>, <i>&#8230;<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_PanicVA<\/b>(<i>format<\/i>, <i>argList<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_SetPanicProc<\/b>(<i>panicProc<\/i>)<\/p>\n<h2>ARGUMENTS <a name=\"ARGUMENTS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"44%\">\n<p style=\"margin-top: 1em\">const char* <i>format<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\">A printf-style format string.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"44%\">\n<p><i>arg<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"29%\">\n<p>Arguments matching the format string.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"44%\">\n<p>va_list <i>argList<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"29%\">\n<p>An argument list of arguments matching the format string. Must have been initialized using <b>va_start<\/b>, and cleared using <b>va_end<\/b>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"44%\">\n<p>Tcl_PanicProc <i>*panicProc<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"29%\">\n<p>Procedure to report fatal error message and abort.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:71%;\">______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">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 <b>Tcl_Panic<\/b> to display a message describing the error and abort the process. The <i>format<\/i> argument is a format string describing how to format the remaining arguments <i>arg<\/i> into an error message, according to the same formatting rules used by the <b>printf<\/b> family of functions. The same formatting rules are also used by the built-in Tcl command <b>format<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In a freshly loaded Tcl library, <b>Tcl_Panic<\/b> prints the formatted error message to the standard error file of the process, and then calls <b>abort<\/b> to terminate the process. <b>Tcl_Panic<\/b> does not return. On Windows, when a debugger is running, the formatted error message is sent to the debugger in stead. If the windows executable does not have a stderr channel (e.g. <b>wish.exe<\/b>), then a system dialog box is used to display the panic message.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_SetPanicProc<\/b> may be used to modify the behavior of <b>Tcl_Panic<\/b>. The <i>panicProc<\/i> argument should match the type <b>Tcl_PanicProc<\/b>:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">typedef void <b>Tcl_PanicProc<\/b>( <br \/> const char *<b>format<\/b>, <b><br \/> arg<\/b>, <b>arg<\/b>,&#8230;);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">After <b>Tcl_SetPanicProc<\/b> returns, any future calls to <b>Tcl_Panic<\/b> will call <i>panicProc<\/i>, passing along the <i>format<\/i> and <i>arg<\/i> arguments. <i>panicProc<\/i> should avoid making calls into the Tcl library, or into other libraries that may call the Tcl library, since the original call to <b>Tcl_Panic<\/b> indicates the Tcl library is not in a state of reliable operation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The typical use of <b>Tcl_SetPanicProc<\/b> arranges for the error message to be displayed or reported in a manner more suitable for the application or the platform.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Although the primary callers of <b>Tcl_Panic<\/b> are the procedures of the Tcl library, <b>Tcl_Panic<\/b> is a public function and may be called by any extension or application that wishes to abort the process and have a panic message displayed the same way that panic messages from Tcl will be displayed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_PanicVA<\/b> is the same as <b>Tcl_Panic<\/b> except that instead of taking a variable number of arguments it takes an argument list.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">abort(3), printf(3), exec(n), format(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">abort, fatal, error<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc \u2212 report fatal error and abort <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3007,3711],"class_list":["post-7398","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-man3","tag-tcl_panicva"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7398"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7398\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}