[Gambas-user] How to get codelinenumber

ub2 at ...36... ub2 at ...36...
Sat Nov 30 09:46:45 CET 2013


Dear Fabien

You're my hero. Thanks!

The only thing I'm still working on is getting the codelinenumber also
in cases without error.

	$CheckVar &= Chr(10) & ?codelinenumber? &": $x=" & $x

Does "error.where" also have, lets say an "MeRightNow.where" sister?

I'll keep on trying.

Regards,
Hubert


Am 29.11.2013 18:41,schrieb Fabien Bodard:
> 2013/11/29 ub2 at ...36... <ub2 at ...36...>:
>> 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?
> in the catch part :
> myerror = Error.text &/ error.where ... for example
> http://gambasdoc.org/help/comp/gb/error/text?v3
>> How to get codelinenumber? (Is there a list of useful things?)
> Error.Where
>> How to get element which started procedure?
> Error.Where
> http://gambasdoc.org/help/comp/gb/error/where?v3
>>
>>
>> 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".
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> 




More information about the User mailing list