Error processing request
Parameters
CONTENT_LENGTH | 0 |
REQUEST_METHOD | GET |
REQUEST_URI | /revision/Tcl_AddErrorInfo?V=0 |
QUERY_STRING | V=0 |
CONTENT_TYPE | |
DOCUMENT_URI | /revision/Tcl_AddErrorInfo |
DOCUMENT_ROOT | /var/www/nikit/nikit/nginx/../docroot |
SCGI | 1 |
SERVER_PROTOCOL | HTTP/1.1 |
HTTPS | on |
REMOTE_ADDR | 172.70.130.182 |
REMOTE_PORT | 9208 |
SERVER_PORT | 4443 |
SERVER_NAME | wiki.tcl-lang.org |
HTTP_HOST | wiki.tcl-lang.org |
HTTP_CONNECTION | Keep-Alive |
HTTP_ACCEPT_ENCODING | gzip, br |
HTTP_X_FORWARDED_FOR | 3.143.247.5 |
HTTP_CF_RAY | 88d6d4810cc2810e-ORD |
HTTP_X_FORWARDED_PROTO | https |
HTTP_CF_VISITOR | {"scheme":"https"} |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) |
HTTP_REFERER | http://tcl.wiki/revision/Tcl%5FAddErrorInfo?V=0 |
HTTP_CF_CONNECTING_IP | 3.143.247.5 |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_IPCOUNTRY | US |
Body
Error
Unknow state transition: LINE -> END
-code
1
-level
0
-errorstack
INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit Tcl_AddErrorInfo {
**Tcl_AddErrorInfo**
2017-08-21 [HaO]:
If a C program wants to add any information to the stack trace, one should start with a newline to separate from already present information.
Example to get a Windows CLR exception reported:
======C
static int SetCLRErrorResult(Tcl_Interp * interp, System::Exception^ exception)
{
if (interp != NULL) {
Tcl_DString Recoded1;
Tcl_DStringInit(&Recoded1);
MString2DString(&Recoded1,exception->Message);
if (Tcl_DStringLength(&Recoded1) > 0) {
Tcl_DStringResult(interp, &Recoded1);
} else {
Tcl_SetResult(interp, fg_error_clr, TCL_STATIC);
}
Tcl_DStringFree(&Recoded1);
// ---------------------------------------------------------------------
// >> Addidional Error trace
Tcl_AddErrorInfo(interp, "\n");
Tcl_AddErrorInfo(interp, fg_error_clr);
Tcl_DStringInit(&Recoded1);
MString2DString(&Recoded1, exception->StackTrace);
if (Tcl_DStringLength(&Recoded1) > 0) {
Tcl_AddErrorInfo(interp, "\n");
Tcl_AddErrorInfo(interp, Tcl_DStringValue(&Recoded1));
Tcl_AddErrorInfo(interp, fg_stack_end);
}
}
return TCL_ERROR;
}
// Set the text corresponding to the given windows error code as result.
static void MString2DString(Tcl_DString *pdOut, String ^mIn)
{
// Protect string from being moved
pin_ptr<const wchar_t> wpIn = PtrToStringChars(mIn);
Tcl_WinTCharToUtf(wpIn, -1, pdOut);
// pinning is released on exit
}
try {
...
}
catch (System::Exception^ exception) {
return SetCLRErrorResult(interp, exception);
}
======
<<categories>>tcl library} regexp2} CALL {my render Tcl_AddErrorInfo {
**Tcl_AddErrorInfo**
2017-08-21 [HaO]:
If a C program wants to add any information to the stack trace, one should start with a newline to separate from already present information.
Example to get a Windows CLR exception reported:
======C
static int SetCLRErrorResult(Tcl_Interp * interp, System::Exception^ exception)
{
if (interp != NULL) {
Tcl_DString Recoded1;
Tcl_DStringInit(&Recoded1);
MString2DString(&Recoded1,exception->Message);
if (Tcl_DStringLength(&Recoded1) > 0) {
Tcl_DStringResult(interp, &Recoded1);
} else {
Tcl_SetResult(interp, fg_error_clr, TCL_STATIC);
}
Tcl_DStringFree(&Recoded1);
// ---------------------------------------------------------------------
// >> Addidional Error trace
Tcl_AddErrorInfo(interp, "\n");
Tcl_AddErrorInfo(interp, fg_error_clr);
Tcl_DStringInit(&Recoded1);
MString2DString(&Recoded1, exception->StackTrace);
if (Tcl_DStringLength(&Recoded1) > 0) {
Tcl_AddErrorInfo(interp, "\n");
Tcl_AddErrorInfo(interp, Tcl_DStringValue(&Recoded1));
Tcl_AddErrorInfo(interp, fg_stack_end);
}
}
return TCL_ERROR;
}
// Set the text corresponding to the given windows error code as result.
static void MString2DString(Tcl_DString *pdOut, String ^mIn)
{
// Protect string from being moved
pin_ptr<const wchar_t> wpIn = PtrToStringChars(mIn);
Tcl_WinTCharToUtf(wpIn, -1, pdOut);
// pinning is released on exit
}
try {
...
}
catch (System::Exception^ exception) {
return SetCLRErrorResult(interp, exception);
}
======
<<categories>>tcl library}} CALL {my revision Tcl_AddErrorInfo} CALL {::oo::Obj1377216 process revision/Tcl_AddErrorInfo} CALL {::oo::Obj1377214 process}
-errorcode
NONE
-errorinfo
Unknow state transition: LINE -> END
while executing
"error $msg"
(class "::Wiki" method "render_wikit" line 6)
invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
(class "::Wiki" method "render" line 8)
invoked from within
"my render $name $C"
(class "::Wiki" method "revision" line 31)
invoked from within
"my revision $page"
(class "::Wiki" method "process" line 56)
invoked from within
"$server process [string trim $uri /]"
-errorline
4