Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/modify+a+proc%27s+behavior+with+a+shim?V=5
QUERY_STRINGV=5
CONTENT_TYPE
DOCUMENT_URI/revision/modify+a+proc's+behavior+with+a+shim
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.130.184
REMOTE_PORT37636
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.140.198.43
HTTP_CF_RAY87703f57aec62c38-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_CF_CONNECTING_IP3.140.198.43
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 {modify a proc's behavior with a shim} {[JBR] 2010-07-12

I have a lot of code that writes code.  Sometimes the "standard" code that gets written from the config files is not exactly the right thing for some specific case.  When this happens I usually modify the standard proc by wrapping a "shim" around it.  This little bit of code makes this less crappy.  It is less general than the code in [stacking] but works for me.
======
 proc shim:shift { name } {
    if { [info commands ${name}_shimmed] ne {} } { shim:shift ${name}_shimmed }
    rename $name ${name}_shimmed
 }

 proc shim { name args body } {
    shim:shift $name
    proc   $name $args $body
 }

 proc shim:next { args } { tailcall [lindex [info level -1] 0]_shimmed {*}$args }

======

Found another version of shim:next even more like [stacking].  Fixed up to use try instead of catch.

 proc shim:next { name args } {
    set level -1
    try {
        while { ![regexp "^${name}(_shimmed)*" [lindex [info level $level] 0]] } { incr level -1 }
    } on error message {
        error "cannot locate shim: $name"
    }

    [lindex [info level $level] 0]_shimmed {*}$args
 }

======

I broke this categories thing but I cannot figure out why.  It looked nice before I edited the page but not now.  Sorry.

 <<categories>>Enter Category Here} regexp2} CALL {my render {modify a proc's behavior with a shim} {[JBR] 2010-07-12

I have a lot of code that writes code.  Sometimes the "standard" code that gets written from the config files is not exactly the right thing for some specific case.  When this happens I usually modify the standard proc by wrapping a "shim" around it.  This little bit of code makes this less crappy.  It is less general than the code in [stacking] but works for me.
======
 proc shim:shift { name } {
    if { [info commands ${name}_shimmed] ne {} } { shim:shift ${name}_shimmed }
    rename $name ${name}_shimmed
 }

 proc shim { name args body } {
    shim:shift $name
    proc   $name $args $body
 }

 proc shim:next { args } { tailcall [lindex [info level -1] 0]_shimmed {*}$args }

======

Found another version of shim:next even more like [stacking].  Fixed up to use try instead of catch.

 proc shim:next { name args } {
    set level -1
    try {
        while { ![regexp "^${name}(_shimmed)*" [lindex [info level $level] 0]] } { incr level -1 }
    } on error message {
        error "cannot locate shim: $name"
    }

    [lindex [info level $level] 0]_shimmed {*}$args
 }

======

I broke this categories thing but I cannot figure out why.  It looked nice before I edited the page but not now.  Sorry.

 <<categories>>Enter Category Here}} CALL {my revision {modify a proc's behavior with a shim}} CALL {::oo::Obj3975953 process revision/modify+a+proc%27s+behavior+with+a+shim} CALL {::oo::Obj3975951 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