Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using IDL / Choosing an Error Code

IDL

Choosing an Error Code

Choosing an Error Code

The choice of which code to use depends on the context in which the message is issued, but IDL_M_NAMED_GENERIC is usually preferred.

Note: For any significant development involving an IDL system routine, we recommend your code be packaged as a Dynamically Loadable Module (DLM), and that your DLM define a message block to contain its errors instead of using the GENERIC messages described here.

If you wish to include arguments into your message string, you should use the sprintf() function from the C standard library to format a string into a temporary buffer, and then supply the buffer as the argument to IDL_Message(). For example, executing the code:

char buf[128];
int unit = 23;
sprintf(buf, "Help! Error number %d.", unit);
IDL_Message(IDL_M_GENERIC, IDL_MSG_LONGJMP, buf);

interrupts the current routine and issues the message:

% Help! Error number 23.



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us