Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: exact row in which error occurs


From   Daniel Feenberg <feenberg@nber.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: exact row in which error occurs
Date   Thu, 24 Nov 2011 07:22:59 -0500 (EST)


On Thu, 24 Nov 2011, Nick Cox wrote:

Stata doesn't work in this way, partly because do-files can and
usually do call other do-files, ado-files, commands, functions, etc.,
and a row number -- presumably meaning file line number -- would not
have very much meaning in many instances, and/or would refer to a line
in code that is proprietary and so hidden from you.



That would be called a "traceback" and I remember it in IBM Fortran G before GUI debugging displaced it. The traceback would look something like:

   illegal command at line 37 of subroutine SUB2

   called from line 21 of subroutine SUB1

   called from line 15 of MAIN

Other compilers gave additional information for each call, such as the value of scalar variables. These were very useful in debugging and had no runtime CPU overhead. (There was some memory used). The alternative with Stata is to -set trace on-, but sometimes that produces a prodigious amount of output. As it is, it is often time consuming to associate a generic error message such as "no variables found" with a particular (a)do file statement in a long program.

Daniel Feenberg
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index