How to get and display TCL error(s) thru 'C' program ??
From: anand (anandv79_at_rediffmail.com)
Date: 02/26/04
- Previous message: Steve Ball: "ANN: Beta 2 of Version 3.0 of TclXML, TclDOM and TclXSLT"
- Next in thread: David Gravereaux: "Re: How to get and display TCL error(s) thru 'C' program ??"
- Reply: David Gravereaux: "Re: How to get and display TCL error(s) thru 'C' program ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Feb 2004 23:15:48 -0800
Hi All,
Consider the following "script.tcl":
for {set x 0} {$x<10} {incr x}
{
puts "x is $x"
}
When on the TCL shell i say %source script.tcl
The shell displays:
wrong # args: should be "for start test next command"
This is expected and correct.
1. Now when i give the same as char * array to 'Tcl_EvalEx' function
in my C program, 'Tcl_EvalEx' returns error '1'; which is also
correct. But after this i want to display the same error string as
displayed by shell. How to go about this ?
2. I tried to get the error number thru 'Tcl_GetErrno' but whatever
the type of error, 'Tcl_GetErrno' always returns 0. ny clues ??
Thanks in Advance,
Anand
- Previous message: Steve Ball: "ANN: Beta 2 of Version 3.0 of TclXML, TclDOM and TclXSLT"
- Next in thread: David Gravereaux: "Re: How to get and display TCL error(s) thru 'C' program ??"
- Reply: David Gravereaux: "Re: How to get and display TCL error(s) thru 'C' program ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|