ietoolkit
ietoolkit copied to clipboard
create error message command
Create a command to be used in all error messages that ouput messages. something like this:
*********************************************
*This is more or less how the command would be defined
*********************************************
cap program drop ietoolkiterror
program define ietoolkiterror
syntax, errorid(string)
local dimeanaylitics_p_end "Did this error help you figure out what was wrong? If not, please report error ID `errorid' to [email protected]."
noi di ""
noi di as input "{pstd}`dimeanaylitics_p_end'{p_end}"
noi di ""
end
*********************************************
*This is how the command would be used
*********************************************
cap program drop erroremail
program define erroremail
di as error "{phang}File not found.{p_end}"
ietoolkiterror, errorid(123456)
error 601
end
erroremail