f



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

0
arijit79 (24)
5/16/2007 11:20:39 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

2 Replies
363 Views

Similar Articles

[PageSpeed] 1

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.

0
lvirden (1938)
5/16/2007 12:32:27 PM
arijit79@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.
0
dnew (1159)
5/16/2007 3:00:04 PM
Reply:

Similar Artilces:

<<<<<<<<<<<<<The Real A.I PROBLEMS">>>>>>>>>>>>>>>>>>>>>>>>>>>
The unvierse is like a ballon with black holes and white holes picture two on each side left two right on upside down the speed and the amout of matter consumed is a direct relations ship two the size of the ballon as the ballon get bigger the gravitaion forces of the black holes increase two self balance the universe it's self fixing but as time go's on and matter moves at diffrent speed's in diffrent dementions and at diffrent rates the demnetions become unstable becasue of misplaced matter ( magnetic plasma hint hint" oppset of black matter. ( sun spots ) why is the...

"new" [<TypeArguments>] <ClassOrInterfaceType> "(" [<ArgumentList>] ")"
According to http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.9 the following production holds <ClassInstanceCreationExpression> ::= "new" [<TypeArguments>] <ClassOrInterfaceType> "(" [<ArgumentList>] ")" What would be an example for a class instance creation expression with type arguments? Here's a reminder about those: <TypeArguments> ::= "<" <TypeArgument> {"," <TypeArgument>} ">" What I would understand would be: <ClassInstanceCre...

<person> <profession value= "csee"/> </person>
http://groups.yahoo.com/group/SandHillEC/ ...

[VIM] change "VARIABLE <relational operator> VALUE" to "VALUE <relational operator> VARIABLE"
In C/C++ the following style of check is preferred : VALUE <relational operator> VARIABLE instead of VARIABLE <relational operator> VALUE eg: if( 5 == data ) is preferred over if( data == 5 while( CONST_NAME != value ) is preferred over while( value != CONST_NAME) I have do the above suggested changes throughout the file. How do I do it using vim ? This is an interesting problem, with several parts. First we'll need a r.e matching constants: [0-9.]\+\|"[^"]*" is a first approximation; it misprocesses strings with internal "'s...

"const <anonymous>**" and "<unknown type>" errors while compiling
Hi, I am trying to compile these set of C++ files and trying out class inheritence and function pointers. Can anybody shed some light why my compiler is not compiling them and where I am going wrong? I am using g++ (GCC) 3.3.5 on a Debian Sarge system. The compiler complains: //**************************** //**************************** Compiler output starts *********** cd /home/red/tmp/testprogs/ time make g++ -gstabs -ansi -Wall -c -I./ hstestprog.cc -o hstestprog.o derivedclass2.h: In constructor ` DerivedClass2<FLOAT>::DerivedClass2(hsOperation<FLOAT>&) [with FL...

VIM: "map! <ESC> <ESC>:wq<ENTER>" turns my arrows keys into <ESC>
Anyone know why this map map! <ESC> <ESC>:wq<ENTER> makes my arrow keys behave like the escape key? After this map whenever I touch any of my arrow keys it writes the file and quits vim - as if I'd hit the <ESC> key with that map. Even the <ESC> key itself doesn't work as advertised because I have to hit it twice to get it to execute the map, whereas the arrow keys kick in the map at first touch. Ian Ian Gil <i@NOSPAMALLOWED.com> wrote: > >Anyone know why this map > > map! <ESC> <ESC>:wq<ENTE...

>>>> TCL 2008 Final call for papers <<<<<
***** TCL 2008 Last Call for participation and papers ****** Note extension of abstract deadline. http://www.tcl.tk/community/tcl2008/ On October 20-24, 2008, the city of Manassas, VA will play host to Tcl 2008. Join us for what promises to be a memorable, informative and fun conference. Tcl 2008 will be held at the Comfort Suites in Manassas, VA; about 30 miles outside of Washington DC . Tutorial sessions on various topics will be held October 20 and 21. The technical sessions will run October 22 through October 24. *** If you are a student check out the special student rates *** at the conference website: *** http://www.tcl.tk/community/tcl2008/ click Registration If you have an interesting Tcl paper to contribute, a tutorial to offer, a suggestion to give, submit it to the Tcl 2008 program commitee: "tcl2008 at tcl dot tk". Pretty much anything Tcl/Tk is acceptable. In the past we have had papers on: * Application of Tcl/Tk in industries as diverse as engineering, science, industrial controls, broadcasting, financial services, medical and electronic design * Networking with Tcl/Tk, including distributed applications and network management * Object frameworks for Tcl/Tk * New widgets and techniques for GUI design with Tk * Simulation and application steering with Tcl/Tk * Tcl/Tk on handheld and embedded devices * New Tcl extensions and add-ons, including Tcllib and Tklib * Tcl/Tk centric operating environments * Tcl/Tk in education an...

Returning Control from a "loop" prematurely >>>Newbie Question<<<
Hi. Let's say I had a function g, which takes an integer as an argument and will either return a positive integer if it has some special property, otherwise it will return 0. Most of the time, for arbitrary inputs, g is going to return 0. Now, suppose I want to set up a loop, and call g with successive arguments (g 1), (g 2), (g 3), and so on... This loop is going to terminate when the loop counter gets to some sentinel value or ,perhaps sooner , if that that special property is found. In C the code might look something like int f (int n) { int result = 0; f (int i = 0;...

Linking error LNK2001
Hi All, I am facing a very unique problem while compling my project in "Release" build. The project is building in DEBUG mode but giving linking error on Release build. Here is the error: Creating library Release/fnimqcmd.lib and object Release/fnimqcmd.exp CoIMQCmd.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(unsigned short)" (__imp_?_Tidy@?$basic_string@DU?$char_ traits@D@std@@V?$allocator@D@2@@std@@AAEXG@Z) CoIM...

"error while performing unknown task for <<Dominant>>"
I've been getting this error since Jan. 3 (yesterday), with Eudora 6.2.4 on OSX 10.3.9. It also says "No reponse from server for 120 seconds." I am able to send and receive mail without problem. I just found others with the same problem on http://eudorabb.qualcomm.com/showthread.php?t=13177&highlight=performing+unknown+task The folks there are wondering if it is related to using sponsored mode (as I do). Has anyone else experienced this problem? On Jan 4, 9:34 pm, kam <k...@invalid.net> wrote: > I've been getting this error since Jan. 3 (yeste...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** Hi! > You too can learn to be funny in just 7 days flat: ....spamming newsgroups, though, just ISN'T funny. Even this newsgroup... Path: attbi_s22!attbi_s21!attbi_slave12!attbi_master11!wn14feed!worldnet.att.net!1 99.218.7.141!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!stat ler.nntpserver.com!hydra.nntpserver.com!not-for-mail From:...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

CSS for All Elements (Bullets <UL> <LI>) Without <DIV ID="">
Hello! I have a quick question regarding CSS and having it applied to all elements. I am trying to eliminate the gap between a paragraph and a list that usually occurs in html and I've found away to do that with this code: <p>a</p> <ul style="margin-top: -20; padding-top: 0"> <li>1</li> </ul> However I was hoping to use CSS to do it to all elements and without using <DIV id="">. Here is an example of the CSS code I have so far, but you need to use <div id="squish"> around them. <style t...

<a style="text-decoration: none;" name="souhaits"></a>
Probably trivial I am trying to separate A:hash from A:link attribute. Thanks. -- X tr�me newbe ....... masm32 windows Xp asus p4 s533/333/133 Intel(R) Celeron (R) CPU 2.00 GHz Jean Pierre Daviau wrote: > Probably trivial > > > I am trying to separate A:hash from A:link attribute. I don�t understand you. But the thread "re links and anchors", which started less than four hours ago, might be helpful. -- Johannes Koch In te domine speravi; non confundar in aeternum. (Te Deum, 4th cent.) Exactly ...

Web resources about - Tcl Error Handing - (file "<filename>" line <lineno>) - Howto get those values? - comp.lang.tcl

Resources last updated: 3/13/2016 2:21:07 PM