[Gambas-user] How to get current procedurename, codelinenumber and raising element

ub2 at ...36... ub2 at ...36...
Fri Nov 29 16:02:52 CET 2013


Dear cracks

After fooling hours/days in Wikipedia, Googling etc I'd like to place my
issue here (before driving nuts). If this is not appropriate please sb
indicate where I can find help. Thanks.

For debugging I'd like to write the following info in a
string: procedure name, code line number, element which has started
current running/failing procedure.

my code:
'-----------------------------------
'Public Procedure ProcXYZ(....
'
'   Dim $CheckVar as String
'   Dim $Testmode as Integer
'   Dim $ResSPos as Result
'
'   ...
'      $ResSPos = HiModSql.Sql2Res("TblVerknAkt",".....
'         $x = $ResSPos!x
'         If $Testmode > 0 Then
'        $CheckVar &= Chr(10) & ?codeline? &": $x=" & $x
'        ...
'   ...
'   Catch
'      Message.Warning("Catch ?procname?, Error=" & Error.code & ", " &
'        Error.text & Chr(10) & "$CheckVar:" & Chr(10) & $CheckVar, "ok")
'
'End
'------------------------------------

My questions:
How to deviate Debug into a string?
How to get codelinenumber? (Is there a list of useful things?)
How to get element which started procedure?


Please apologize if code formatting is not state of the art.
I'm autodidact.


Thanks for your help.

Regards,
ub2


Note: I'm an quite enthusiastic Gambas user. Thanks, you're doing great.
Go ahead and do not bother never ending "Basic-Discussion-bigots".







More information about the User mailing list