Am 30.07.19 um 11:00 schrieb Riccardo (Jack) Lucchetti:
Every now and then, when writing scripts, I'd like to use error codes
that are consistent with those in libgretl; of course we have access to
the source code, so it's easy to see what the available error codes are
(
https://sourceforge.net/p/gretl/git/ci/master/tree/lib/src/gretl_errors.c),
but every now and then I find myself using this kind of thing:
<hansl>
set verbose off
k = 1
err = 0
loop while !err --quiet
catch s = errmsg(k)
err = $error
if !err
printf "%3d: %s\n", k++, s
endif
endloop
</endloop>
Would it be worthwhile to add the output of the above to the
documentation? And if so, where?
Indeed useful I would say.
I think the appendix of the user guide could be a place where to put
this. However, the "catch" command is described in detail in the command
reference instead, and "catch" and "$error" are just mentioned in Ch.
10
and 23 in the user guide. So, there seems to be no central location
discussing error handling. This is why I think the appendix might be
'the' right place to which we can also link at 1 or 2 points in the
command reference and/ user guide.
Artur