Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

Tcl Error Handing - (file "<filename>" line <lineno>) - Howto get those values?


Hi,

My appologies if this is not the right forum to ask this question.

I created a Tcl interprater using Tcl_Interp

Now, I need to add error handling code to it just like tclsh.

On seeing a syntax error, tclsh prints two set of info:

$errorInfo

<Info about the location of the erred code>

The location info looks somewhat like this:

    (file "test.tcl" line 12)
    invoked from within
"source test.tcl"
    (file "test1.ralf" line 5)

I wanted to add this location info to my error handling code. But I
was wondering if I need to build and maintain this info myself from
scratch or Tcl stores this info in some variable/function which I just
need to use to get this info.

Appreciate an help here.

Thank you,
Arijit

On May 16, 7:20 am, ariji@gmail.com wrote:

> I wanted to add this location info to my error handling code.

Read up on Tcl_LogCommandInfo, which appears in the tclStubInit so it
appears to be a public interface.

ariji@gmail.com wrote:
> I wanted to add this location info to my error handling code.

You might also want to look at the global variables errorInfo and errorCode.

--
   Darren New / San Diego, CA, USA (PST)
     His kernel fu is strong.
     He studied at the Shao Linux Temple.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc