[Gretl-users] Error messages from inside functions

andreas.rosenblad at ltv.se andreas.rosenblad at ltv.se
Tue Oct 16 06:04:34 EDT 2007


I am writing a function that, when used with some bad input variables,
breaks with the following error message:

No observations would be left!
>> smpl group != groupremove_k --restrict

I would prefer to have the possibility to

a) Prevent these error messages from the output and instead provide my own
error message, e.g. funcerr "ERROR: No observations left!"

or, if this is not possible,

b) prevent the error message ">> smpl group != groupremove_k --restrict"
from the output and only have the output "No observations would be left!".

How should I do this in a gretl function?

Best regards
Andreas



More information about the Gretl-users mailing list