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

Home » Public Forums » archive » Consensus on error handling with DLMs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Consensus on error handling with DLMs [message #24838] Thu, 26 April 2001 10:38 Go to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
Hi all,

I've more or less finished writing an IDL interface to Postgres and I'm
now in the debugging stage. I thought I'd take a poll to see what people
think of appropriate error returns. In this library I have a variety of
function returns... integers, floats, doubles, strings, complex structures
and so forth. For integer returns, I usually default to giving the user a
message with the handle IDL_MSG_INFO in IDL_Message and returning -1 on
failure. Is there a good protocol for signifying an error in strings,
structures and arrays? Some of my default string returns are themselves
null strings (indicating that no data or message was found) so it wouldn't
be wise to simply return a null string on error. I am also very reluctant
to return a float -1.0000 as testing for this can lead to problems with
IEEE number definitions in C. For the moment, I am using the
IDL_MSG_LONGJMP to signal an error in all routines that don't return an
IDL integer. It stops the interpreter immediately (which isn't
necessarily bad) as it signifies a major fault. Comments?

Thanks,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: AAARGH!!! IDL5.2 crashes with CALL_EXTERNAL
Next Topic: subtle but important

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

Current Time: Wed Oct 08 19:11:30 PDT 2025

Total time taken to generate the page: 0.00566 seconds