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

Home » Public Forums » archive » catch error inside idlbridge
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
catch error inside idlbridge [message #94850] Mon, 06 November 2017 14:28 Go to next message
andre.waehlisch is currently offline  andre.waehlisch
Messages: 3
Registered: July 2017
Junior Member
Can someone explain to me the following behavior or is this a bug? I am trying to catch an error in my idlbridge object, but this fails (put in C:\test\test.pro):

pro test2
on_ioerror, jmp
openr, unit, 'nothing', /get_lun ; provoke error
jmp: return
end

pro test
a = obj_new('idl_idlbridge')
a->execute, 'cd, "C:\test"' ; make sure idlbridge knows this file
a->execute, 'resolve_routine, "test"'
a->execute, 'test2' ; the error does not get caught and execution halts here
end
Re: catch error inside idlbridge [message #94854 is a reply to message #94850] Tue, 07 November 2017 09:53 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
The documentation warns that
http://www.harrisgeospatial.com/docs/IDL_IDLBridge.html

"Debugging a routine running in a child IDL process presents challenges not present when debugging routines running in the main IDL process. Child IDL processes have no direct connection to the parent IDL process."

I agree that the documentation is ambiguous about whether one should be able to use ON_IOError in the child process. Two things I would try:

1. Use the FILE_TEST() function to test for a valid file.
2. Have an error parameter which can be passed between the child process and the main process

On Monday, November 6, 2017 at 5:28:31 PM UTC-5, andre.w...@web.de wrote:
> Can someone explain to me the following behavior or is this a bug? I am trying to catch an error in my idlbridge object, but this fails (put in C:\test\test.pro):
>
> pro test2
> on_ioerror, jmp
> openr, unit, 'nothing', /get_lun ; provoke error
> jmp: return
> end
>
> pro test
> a = obj_new('idl_idlbridge')
> a->execute, 'cd, "C:\test"' ; make sure idlbridge knows this file
> a->execute, 'resolve_routine, "test"'
> a->execute, 'test2' ; the error does not get caught and execution halts here
> end
Re: catch error inside idlbridge [message #94862 is a reply to message #94854] Mon, 13 November 2017 05:03 Go to previous message
andre.waehlisch is currently offline  andre.waehlisch
Messages: 3
Registered: July 2017
Junior Member
Thanks for your reply and sorry for my late response. Your workaround, to try to avoid the error altogether, is of course valid and working. It seems I will have to adjust all my error catching code (CATCH is not working too!), if I want to run it in parallel.

On Tuesday, 7 November 2017 18:53:55 UTC+1, wlandsman wrote:
> The documentation warns that
> http://www.harrisgeospatial.com/docs/IDL_IDLBridge.html
>
> "Debugging a routine running in a child IDL process presents challenges not present when debugging routines running in the main IDL process. Child IDL processes have no direct connection to the parent IDL process."
>
> I agree that the documentation is ambiguous about whether one should be able to use ON_IOError in the child process. Two things I would try:
>
> 1. Use the FILE_TEST() function to test for a valid file.
> 2. Have an error parameter which can be passed between the child process and the main process
>
> On Monday, November 6, 2017 at 5:28:31 PM UTC-5, andre.w...@web.de wrote:
>> Can someone explain to me the following behavior or is this a bug? I am trying to catch an error in my idlbridge object, but this fails (put in C:\test\test.pro):
>>
>> pro test2
>> on_ioerror, jmp
>> openr, unit, 'nothing', /get_lun ; provoke error
>> jmp: return
>> end
>>
>> pro test
>> a = obj_new('idl_idlbridge')
>> a->execute, 'cd, "C:\test"' ; make sure idlbridge knows this file
>> a->execute, 'resolve_routine, "test"'
>> a->execute, 'test2' ; the error does not get caught and execution halts here
>> end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to eliminate smaller blob from label_region image
Next Topic: CgGreek not compiling: new IDL, new OS X

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

Current Time: Wed Oct 08 07:09:22 PDT 2025

Total time taken to generate the page: 0.00354 seconds