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

Home » Public Forums » archive » Re: DLM's and C code
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: DLM's and C code [message #28736 is a reply to message #28721] Wed, 09 January 2002 07:39 Go to previous messageGo to previous message
Richard Tyc is currently offline  Richard Tyc
Messages: 69
Registered: June 1999
Member
I was thinking of IDL_Message too, but the descriptions of the 'actions'
possible puzzled me :
From Docs:

IDL_MSG_EXIT - Use this argument to cause the IDL process to exit after the
message is issued. This code should never be used in a system function or
procedure - it is intended for use in other sections of the system.

Is my C stub in the DLM/DLM a system function or procedure. Would this work
or would it crash IDL? I will try it

IDL_MSG_LONGJMP - It is an error to use this action code in code not called
by the IDL interpreter since the resulting call to longjmp() will be
invalid.
I assume this would be my case since I am deeply nested in the DLL and not
in the C function directly called by the interpreter.

So unless IDL_MSG_EXIT works, I don't think this will do. I will try it.

Thanks
Rich

Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote in message
news:onk7usoxty.fsf@cow.physics.wisc.edu...
>
> "Richard Tyc" <Richard_Tyc@sbrc.umanitoba.ca> writes:
>
>
>> A somewhat IDL related question.
>> I am trying to link in some C code via a DLM. I use a wrapper routine to
>> handle the call from IDL and manipulate the args and return data. Within
the
>> wrapper, I call C functions linked in through another DLL.
>>
>> What is the best way to handle errors while deeply nested within layers
of C
>> functions.? The ANSI C code I am using essentially had exit(1) calls
for
>> major errors. Is there an IDL_ function (like say an exit handler) I
can
>> call to cleanly return to IDL rather than a trying to modify the call
stack
>> and get back to the IDL wrapper function to perform something like a
return
>> IDL_StrToSTRING("ERROR") ;
>
> For example, do you mean the routine IDL_Message() ?
>
> Looking in the EDG, there are lots of cool options you can use, which
> define what happens after the error is triggered.
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Working with 2 partially overlapping images of different array sizes
Next Topic: Simple question,

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

Current Time: Sat Nov 29 22:11:46 PST 2025

Total time taken to generate the page: 0.00970 seconds