[Thread Prev][Thread Next][Index]

Re: [ferret_users] printing filename and line number at error



Hi Marco
 
I like the idea of including the name of the script in error messages. I would make use of that. I'm not sure whether also including the line-number would be easy to implement but we'll have a look at these ideas.
 
Meanwhile a further tool is available for debugging. Starting with Ferret v6.9, redirect the output to a log file using SET REDIRECT. Then that log output includes lines that list entry and exit from scripts, and the Unix tool FshowGO makes a listing of the go-script calls. This is discussed here:
 
../../documentation/users-guide/commands-reference/SET.html#_VPINDEXENTRY_SET_REDIRECT
../../documentation/users-guide/introduction/UNIX-TOOLS#_FshowGO
 
And one more thing: if your set of calls includes scripts that may turn off mode verify, but you want to see the commands they run, start the session with
 
SET MODE VERIFY:always
 
which causes any CANCEL MODE VERIFY commands to be ignored.
 
-Ansley
 
 
On 1/28/2020 1:09 AM, Marco van Hulten wrote:
Ryo—
 
On 28 Jan 11:46 Ryo Furue wrote:
On Mon, Jan 27, 2020 at 11:39 PM Marco van Hulten <Marco.Hulten@xxxxxx>
wrote:
 
When Ferret returns an error, is it possible to print the filename and
linenumber of the GO script?
[ . . . ]
This is especially useful in my case where I am using jnl scripts that
call other jnl scripts and so on.
I would certainly appreciate such a feature.  But, with "set mode verify",
you can usually track down where the error is.
Yes, that's true enough.  I now initialise a variable "verbosity" and
then use this line at the start of my scripts:
 
\if `verbosity lt 2` then cancel mode verify else set mode verify
 
and cancel at the end of the script.  That way VERIFY is disabled when
back at the prompt.
 
—Marco
 

[Thread Prev][Thread Next][Index]