Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Tcl_AddErrorInfo?V=0
QUERY_STRINGV=0
CONTENT_TYPE
DOCUMENT_URI/revision/Tcl_AddErrorInfo
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.130.182
REMOTE_PORT9208
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.143.247.5
HTTP_CF_RAY88d6d4810cc2810e-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_REFERERhttp://tcl.wiki/revision/Tcl%5FAddErrorInfo?V=0
HTTP_CF_CONNECTING_IP3.143.247.5
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

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