Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0d32ed30c7ee28f14edb92d543b8c0d0af7fbab1
Ticket: 652765ffffffffffffffffffffffffffffffffff
errors disappear in trace callbacks
User & Date: duquette on 2004-08-25 21:15:05
Changes

  1. icomment:
    Logged In: YES 
    user_id=372859
    
    Vince,
    
    Using bgerror really only works well if you're running an app with an 
    event loop.  There are lots of Tcl applications that don't, and Snit (my 
    particular interest) can be used in both.  So I can't just use bgerror to 
    flag errors in Snit's rename trace callback.
    
    You ask "which of these two is it?"  Am I trying to discover programming 
    errors, or am I trying to signal conditions that a programmer might wish 
    to catch?
    
    The answer is, "both".  I like Tcl's error handling; I really dislike having 
    code in which errors can occur silently.  For that reason, I'm 
    philosophically against the current implementation, as it's the one place 
    (that I'm aware of) in which errors are ignored without recourse.  
    (Bgerror is not a real recourse, for the reason I stated above.)
    
    But in any event, it's a false dichotomy.  If I have a module which--for 
    whatever reason--contains commands that should not be renamed, it 
    seems reasonable to use a rename trace to catch attempts to rename 
    them, and throw an error if they do, just as some folks use variable 
    traces to control what can be assigned to particular variables.  If errors 
    are thrown in these cases, it's probably not a "condition which a 
    programmer might wish to catch and workaround"; it's a logical error in 
    the program that has to be fixed.
    
    Will
    
    
  2. login: "duquette"
  3. mimetype: "text/plain"
  4. username: "duquette"