Line Number in Procedure Stack

Posted by byoung2735 on 30-Jun-2016 04:26

Is it possible to get the line number of a program within the current running stack?

I'm currently using program-name(3) to successfully get the name of a program within a session trigger. Is it possible to get the line number within that program, something like line-number(3)?

Thanks.

All Replies

Posted by Stefan Drissen on 30-Jun-2016 04:48

Not that easily, but you can parse the callstack:

run whereami.

procedure whereami:

    def var ii as int.

    session:error-stack-trace = true.

    ii = integer("a").

    catch e as progress.lang.error:

       message e:callstack view-as alert-box.

    end catch.
    
end procedure.

This thread is closed