Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: alternative to do with nostop option


From   Nick Cox <n.j.cox@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: alternative to do with nostop option
Date   Mon, 22 Sep 2008 16:08:41 -0500

Your question implies that you regard the errors that might arise as (say) serious and less serious. Fair enough, but see the problem from Stata's point of view: How is it supposed to tell which is which?

You must tell it. So, there is not a solution at the level of -do-, as that would pass to Stata the responsibility of deciding, which is really
yours.

Rather, you can specify which is which by using -capture- to eat less serious errors.

Nick
permanent address: n.j.cox@durham.ac.uk

kokootchke wrote:


Is there a way to tell Stata to continue running a do file even if *SOME* of the commands would give an "error"?
I know that in general I could use -do myfile, nostop- and then Stata won't stop at all if it finds an error. But I don't like this because I'd actually like it to stop if there's an actual error... but if I say something like -drop x- and x doesn't exist, I don't really think of it as an error, so I'd like it to keep going ONLY IN THIS CASE.

Is there something that would make this happen? Or am I asking for too much here?
*
*   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   |   What's new   |   Site index