Re: retrieving line number in case of error - "simple debugger"



Nicolas Castagne wrote:
Hi all,

I will use tcl within a C/C++ application in order to execute scripts writen by users. The app starts a Tcl_Interp, and execute the file.

I would need to display basic information to the user in case an error occurs. Among these, the error line on which the error occured.

My two question are :
1/ Given a script, how can I retrieve the exact line on which the error occured ?

You can not.

Reason, the command may have been constructed by the script and evaluated.

2/ Do you know a nice HOWTO or code sample for building basic debug features ?

man puts .