error issues (apologies if this is duplicate) 
Author Message
 error issues (apologies if this is duplicate)

Here is the code:

 proc setDatasetID { w } {

    global datasetID
    set boofoo 0
    set datasetID [eval $w]
    if {[catch {after 2000 {eventMsg "Dataset ID: $datasetID" "" }}
boofoo ]} {
        logMsg "$boofoo" "ERROR"
        }
 }

Since the "eventMsg" procedure is expecting only one parameter, this raises
an error. However, the error comes up with the "Application error" message
box, not the "logMsg" error, that it should go to based on the catch,
right??

When I remove the extra parameter, the "eventMsg" routine accurately runs,
and the "logMsg" is ignored.

This leads me to the next question - is this a bgerror issue? Should I be
trapping this with bgerror, or some other built-in tcl or tk function? If
yes, could you provide me an example?

Thanks in advance. This newsgroup is a real lifesaver!
Don



Sat, 24 Jul 2004 20:53:25 GMT  
 error issues (apologies if this is duplicate)

Quote:

> Here is the code:

>  proc setDatasetID { w } {

>     global datasetID
>     set boofoo 0
>     set datasetID [eval $w]
>     if {[catch {after 2000 {eventMsg "Dataset ID: $datasetID" "" }}
> boofoo ]} {
>         logMsg "$boofoo" "ERROR"
>         }
>  }

> Since the "eventMsg" procedure is expecting only one parameter, this
> raises an error. However, the error comes up with the "Application
> error" message box, not the "logMsg" error, that it should go to based
> on the catch, right??

> When I remove the extra parameter, the "eventMsg" routine accurately
> runs, and the "logMsg" is ignored.

> This leads me to the next question - is this a bgerror issue?

Yes. When you do

catch {after 2000 {eventMsg "Dataset ID: $datasetID" "" }}

Your actually catching the [after] statement. So if you have an error in
your after statement, then you'll get the [logMsg]. But since your [after]
is correct, the catch succeeds (or fails, depending on whether you're a
pessimist or an optimist).

So your [eventMsg] is queued and two seconds later, you get the bgerror
message.

Or at any rate, that's how I understand it. Other may contradict me.

L

--

D'obscures manoeuvres ont eu lieu dans l'ombre et je ferai toute la lumire
sur ces tnbreux agis{*filter*}ts! C'est du march noir!
                                             -Achille Talon



Sat, 24 Jul 2004 23:21:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Duplicate label error - no duplicate!

2. binary seial t'fer : error and apologies

3. Duplicate key error

4. Could Any one help Duplicate Symbol error at compile

5. Auto increment Error: Creates Duplicate Key (40)

6. Duplicate Key Errors using PrimeAutoInc() (C5EEB)

7. TPS file duplicate key error

8. Duplicate Key error with Tpsfix in C5 Professional

9. link error-duplicate symbol TPS_DrvReg - Help me Jim Kane

10. Duplicate Key error with Tpsfix in C5 Professional

11. "creates duplicate key" error

12. Error 40 Create Duplicate Key

 

 
Powered by phpBB® Forum Software