Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Jeph Herrin <stata@spandrel.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: exact row in which error occurs |

Date |
Sun, 27 Nov 2011 11:13:17 -0500 |

I would be happy if Stata could keep track of the name of the do-file (or program) that was currently active. I have tried on several occasions to write a wrapper that would do this for me via some global variable(s), but it's not possible to manage the situation where a Stata ado-file calls another ado-file. On 11/24/2011 7:39 AM, Ivica Rubil wrote:

I agree. But, it would still be useful that Stata can detect the exact line where an error occurs in cases where one has a code in which no other .do file is called. ivica -- Ivica Rubil Ekonomski institut / The Institute of Economics, Zagreb a. Trg J. F. Kennedyja 7, 10 000 Zagreb, Croatia t. +385-1-2362-269 f. +385-1-2335-165 e. irubil@eizg.hr www.eizg.hr -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: 24. studeni 2011 12:28 To: statalist@hsphsun2.harvard.edu Subject: Re: st: exact row in which error occurs 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. -set trace- leads to ways of detecting where errors occur. Otherwise the difference between -do- and -run- is important here. Nick On Thu, Nov 24, 2011 at 11:07 AM, Ivica Rubil<irubil@eizg.hr> wrote:does anybody of you know if there is a way to get Stata give me thetheexact row number where an error occurs in a do file? I'm surprisedthatStata -- way too "smart" a program -- does not give it regularly, included in error messages.* * 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/ * * 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/ ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1873 / Virus Database: 2101/4634 - Release Date: 11/23/11

* * 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/

**References**:**Re: st: Combining variables without adding***From:*daniel klein <klein.daniel.81@googlemail.com>

**Re: st: Combining variables without adding***From:*Nick Cox <njcoxstata@gmail.com>

**st: exact row in which error occurs***From:*"Ivica Rubil" <irubil@eizg.hr>

**Re: st: exact row in which error occurs***From:*Nick Cox <njcoxstata@gmail.com>

**RE: st: exact row in which error occurs***From:*"Ivica Rubil" <irubil@eizg.hr>

- Prev by Date:
**Re: st: Computation Speed for Bootstrapping** - Next by Date:
**st: Mean of interval-censored data** - Previous by thread:
**RE: st: exact row in which error occurs** - Next by thread:
**st: FW: Possible to generate a variable and specifying the label?** - Index(es):