Re: Four easy ones
Posted in 1996
Ramiro Rela wrote: > > Before I start asking, let me tell you I'm working on I4GL V4.1 under > AIX. > ... > FOURTH. > Can I get the current line, current module (current function, am I > asking > too much?) that was executing when a run-time error was ocurred? > I need this to be shown by a function (WHENEVER ERROR CALL). > Does I4GL include such debug information into the .4go or .4gi? You could look into utilities like sccs which is a unix mechanism for source code control. It enables things like: if sqlca.sqlcode <> 0 then call catastrophy("%M%(%C%)",sqlca.sqlcode,"blah blah") end if After passing through sccs, %M% is replaced by the module name (e.g. myfunc.4gl) and %C% is replaced by the line number. Sccs offers all kinds of other possibilities, but I don't see a way to use it with "whenever error call". Of course, "whenever error stop" will cause 4gl to report the module name and line number, but then you lose control. ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl frantz@centrum.is http://www.strengur.is/~frantz/pow4gl.html