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

RE: st: too many variables

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: too many variables
Date   Mon, 1 Sep 2008 14:29:55 +0100

I don't quite get what is implied by "reserved" for Stata use. StataCorp
have their own conventions, but they don't so far as I can see prohibit
or inhibit your use of any particular error codes. In fact you can be
creative, and issue error codes like e(1776) or e(1812) if the user gets
confused between American and British spelling. 

As a user-programmer I like to use the same codes that official Stata
does, and I guess everyone votes for the consistency and clarity that
but even if I didn't no one really suffers so long as the error message
is informative. In other threads Sergiy has (understandably) grumbled a
bit about some rather uninformative error messages. 

There is a key difference between 

error xxx 


di as err "<error message>" 
exit xxx 

where xxx is some code. 

In the first case, no error message will be generated unless Stata has
one predefined. 

In the second case, your error code almost always doesn't matter much so
long as it is non-zero. 198 or 498 are good agnostic choices. An
exception in principle might be if someone else's program looked for
particular error codes, but examples don't spring to mind. 

[email protected]  

Sergiy Radyakin

Which error codes are reserved for Stata use? Is there a full list of
these codes (and messages if possible)? Which codes may a Stata
programmer use for his/her own commands?

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index