Error processing request
Parameters
CONTENT_LENGTH | 0 |
REQUEST_METHOD | GET |
REQUEST_URI | /revision/info+level?V=13 |
QUERY_STRING | V=13 |
CONTENT_TYPE | |
DOCUMENT_URI | /revision/info+level |
DOCUMENT_ROOT | /var/www/nikit/nikit/nginx/../docroot |
SCGI | 1 |
SERVER_PROTOCOL | HTTP/1.1 |
HTTPS | on |
REMOTE_ADDR | 172.70.131.145 |
REMOTE_PORT | 65058 |
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.15.229.113 |
HTTP_CF_RAY | 87ff0c4ec95d2d46-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_CF_CONNECTING_IP | 3.15.229.113 |
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 {info level} {'''info level''' ''?number?''
If ''number'' is not specified, this command returns a number giving the stack level of the invoking procedure, or 0 if the command is invoked at top-level. If ''number'' is specified, then the result is a list consisting of the name and arguments for the procedure call at level ''number'' on the stack. If ''number'' is positive then it selects a particular stack level (1 refers to the top-most active procedure, 2 to the procedure it called, and so on); otherwise it gives a level relative to the current level (0 refers to the current procedure, -1 to its caller, and so on). See the [uplevel] command for more information on what stack levels mean.
----
See also:
* [info]
----
''[MGS]'' [[2003/09/09]] - Note that '''info level 0''' does not return values for optional arguments (if they have not been specified):
======
proc foo {bar {baz NULL}} {
puts "info level 0 = \[[info level 0]\]"
}
# example1
foo abc def
# example2
foo abc
======
prints:
======none
info level 0 = [foo abc def]
info level 0 = [foo abc]
======
[DGP] Correct. [[info level $level]] returns the substituted list of values that make up the actual command as evaluated.
To get values for non-specified default arguments, you have to do quite a bit more work using [info args], [info default].
This proc will print out info for all args in the calling proc ('''note''': does not handle being called from global level).
======
proc arginfo {} {
set proc [lindex [info level -1] 0]
set which [uplevel [list namespace which -command $proc]]
puts "proc \[$which\]"
set i -1
foreach arg [info args $which] {
incr i
set value [uplevel [list set $arg]]
if { [info default $which $arg def] } {
puts " arg\[$i\] \[$arg\] = \[$value\] default = \[$def\]"
} else {
puts " arg\[$i\] \[$arg\] = \[$value\]"
}
}
}
# test code
proc test {foo {"bar baz" "BAR BAZ"}} {
arginfo
}
test abc
test abc def
hich prints the output:
proc [::test]
arg[0] [foo] = [abc]
arg[1] [bar baz] = [BAR BAZ] default = [BAR BAZ]
proc [::test]
arg[0] [foo] = [abc]
arg[1] [bar baz] = [def] default = [BAR BAZ]
=====
<<categories>> Command | Tcl syntax} regexp2} CALL {my render {info level} {'''info level''' ''?number?''
If ''number'' is not specified, this command returns a number giving the stack level of the invoking procedure, or 0 if the command is invoked at top-level. If ''number'' is specified, then the result is a list consisting of the name and arguments for the procedure call at level ''number'' on the stack. If ''number'' is positive then it selects a particular stack level (1 refers to the top-most active procedure, 2 to the procedure it called, and so on); otherwise it gives a level relative to the current level (0 refers to the current procedure, -1 to its caller, and so on). See the [uplevel] command for more information on what stack levels mean.
----
See also:
* [info]
----
''[MGS]'' [[2003/09/09]] - Note that '''info level 0''' does not return values for optional arguments (if they have not been specified):
======
proc foo {bar {baz NULL}} {
puts "info level 0 = \[[info level 0]\]"
}
# example1
foo abc def
# example2
foo abc
======
prints:
======none
info level 0 = [foo abc def]
info level 0 = [foo abc]
======
[DGP] Correct. [[info level $level]] returns the substituted list of values that make up the actual command as evaluated.
To get values for non-specified default arguments, you have to do quite a bit more work using [info args], [info default].
This proc will print out info for all args in the calling proc ('''note''': does not handle being called from global level).
======
proc arginfo {} {
set proc [lindex [info level -1] 0]
set which [uplevel [list namespace which -command $proc]]
puts "proc \[$which\]"
set i -1
foreach arg [info args $which] {
incr i
set value [uplevel [list set $arg]]
if { [info default $which $arg def] } {
puts " arg\[$i\] \[$arg\] = \[$value\] default = \[$def\]"
} else {
puts " arg\[$i\] \[$arg\] = \[$value\]"
}
}
}
# test code
proc test {foo {"bar baz" "BAR BAZ"}} {
arginfo
}
test abc
test abc def
hich prints the output:
proc [::test]
arg[0] [foo] = [abc]
arg[1] [bar baz] = [BAR BAZ] default = [BAR BAZ]
proc [::test]
arg[0] [foo] = [abc]
arg[1] [bar baz] = [def] default = [BAR BAZ]
=====
<<categories>> Command | Tcl syntax}} CALL {my revision {info level}} CALL {::oo::Obj7270393 process revision/info+level} CALL {::oo::Obj7270391 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