comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How can I show error line numbers when running .sav on Virtual Machine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How can I show error line numbers when running .sav on Virtual Machine [message #86258 is a reply to message #86254] Mon, 21 October 2013 22:20 Go to previous messageGo to previous message
Moritz Fischer is currently offline  Moritz Fischer
Messages: 32
Registered: June 2013
Member
Indeed, you can get the line number with the statement
(SCOPE_TRACEBACK( /STRUCT )).line[-1]
The problem is, in your case, where to put it (in the catch block
doesn't make sense). Maybe you could write a wrapper routine for error
handling, and thus preserve the line number?

Am 22.10.2013 05:22, schrieb Michael Galloy:
> <timothyja123@gmail.com> wrote:
>> Hi guys,
>>
>> My application has the following code to catch as display errors:
>>
>> CATCH, errorNum
>> IF (errorNum NE 0) THEN BEGIN
>> CATCH, /Cancel
>> HELP, /Last_Message, Output = lastError
>> v = DIALOG_MESSAGE(LastError)
>> Error = LastError[0]
>> RETURN
>> ENDIF
>>
>>
>> The application is built into a .sav file and run on the IDL Virtual
>> Machine. My problem is that when an error is hit there are no line
>> numbers in the error message. Is there some way to build the .sav file to
>> retain and display the line numbers like when running directly from the
>> source in the Workbench?
>>
>> Tim
>>
>> IDL version 8.2.3
>
> I'm not near a computer, but how about the TRACEBACK keyword to HELP?
>
> Mike
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: most probable value of a data set
Next Topic: Re: object argument passing behaviour changed in v8.2.2?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 10:33:20 PDT 2025

Total time taken to generate the page: 0.64102 seconds