Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 034a12ea4731041ae3d474dca3ad2a04098840a5
Ticket: 3045010fffffffffffffffffffffffffffffffff
[apply]: overlong "wrong # args" error
User & Date: andygoth on 2010-08-14 18:36:49
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    [apply]'s "wrong # args" error message is impractically long, because it contains the full lambda.  I imagine this is a consequence of using Tcl_WrongNumArgs() with objc=2.  For example:
    
    apply {{msg rep} {
        for {set i 0} {$i < $rep} {incr i} {
            puts $msg
        }
    }}
    
    gives the error:
    
    wrong # args: should be "apply {{msg rep} {
        for {set i 0} {$i < $rep} {incr i} {
            puts $msg
        }
    }} msg rep"
    
    I suggest omitting the lambda, since the only relevant part (the parameter list) is repeated at the end of the error anyway.  In my example, this would be simply:
    
    wrong # args: should be "apply lambdaExpr msg rep"
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "andygoth"
  10. subsystem changed to: "16. Commands A-H"
  11. title changed to: "[apply]: overlong "wrong # args" error"
  12. type changed to: "Bug"