From cottrell@wfu.edu Sun Nov 7 10:47:13 2010 From: Allin Cottrell To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] nested function error reporting Date: Sun, 07 Nov 2010 10:47:12 -0500 Message-ID: In-Reply-To: 7337_1288966145_oA5E95Td007580_4CD40FF8.3040709@gmx.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8795789959788346820==" --===============8795789959788346820== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, 5 Nov 2010, Sven Schreiber wrote: > I stumbled across a glitch with error messages occurring in > nested functions. I'm reporting it not per se, but because it > might hint at a deeper issue with nested functions, given a > history of subtle flakiness with function scopes and such -- I > just don't know [...] Agreed, the error message(s) you reported are somewhat confusing. However, I don't think they "hint at a deeper issue" -- it's just that getting the error reporting "right" is quite tricky. I've now had another go at this, and I think the output should be clearer. Here's a simple example: The output from the above is now: ? scalar s = f1(9) The symbol 'z' is undefined *** error in function f3 > y = sqrt(z) called by function f2 called by function f1 That is, we print only one "error in function" message, pertaining to the function which directly produced the error, and if this function is nested we follow up by printing the "call stack". Allin --===============8795789959788346820==-- From svetosch@gmx.net Sun Nov 7 11:21:41 2010 From: Sven Schreiber To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] nested function error reporting Date: Sun, 07 Nov 2010 17:21:29 +0100 Message-ID: <4CD6D209.6040601@gmx.net> In-Reply-To: Pine.A41.4.58.1011071038530.442864@f1n11.sp2net.wfu.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5260886109610056568==" --===============5260886109610056568== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Am 07.11.2010 16:47, schrieb Allin Cottrell: > The output from the above is now: > > > ? scalar s = f1(9) > The symbol 'z' is undefined > > *** error in function f3 >> y = sqrt(z) > called by function f2 > called by function f1 > > > That is, we print only one "error in function" message, pertaining > to the function which directly produced the error, and if this > function is nested we follow up by printing the "call stack". > looks good! I'll watch out for it showing up in practice. thanks, sven --===============5260886109610056568==--