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 on April 23, and its replacement, 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   Nick Cox <>
To   "''" <>
Subject   RE: st: exact row in which error occurs
Date   Thu, 24 Nov 2011 14:33:31 +0000

I can see why you want this.  

Naturally, if Stata did start implementing "error on line ... of ..." then sometimes it might be useful and other times it could just be ignored. 

My main point is factual: Stata doesn't work that way.


-----Original Message-----
From: [] On Behalf Of Ivica Rubil
Sent: 24 November 2011 12:40
Subject: RE: st: exact row in which error occurs

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.


-----Original Message-----
[] On Behalf Of Nick Cox
Sent: 24. studeni 2011 12:28
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.


On Thu, Nov 24, 2011 at 11:07 AM, Ivica Rubil <> wrote:

> does anybody of you know if there is a way to get Stata give me the
> exact row number where an error occurs in a do file? I'm surprised
> Stata -- way too "smart" a program -- does not give it regularly,
> included in error messages.

*   For searches and help try:

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