I have a astronomy procedure that returns an error message, but it uses the /inf flag. With this flag, none of the normal error flags are set. So how would one catch such an error? For example, I call the procedure, it prints out the informational error message, but how can I check if it outputted such a message? I see it in the console, but how can the program check for this?
Asked
Active
Viewed 279 times
2 Answers
0
I don't believe that is possible. According to the docs, when the INFORMATIONAL
keyword is set, !error_state
is not changed.
Set this keyword to issue informational text instead of an error. In this case, !ERROR_STATE is not set. The !QUIET system variable controls the printing of informational messages.

mgalloy
- 2,356
- 1
- 12
- 10
-
I was hoping there would be a way to get the last message posted to the terminal or something like that. – Doug Oct 18 '13 at 23:05
0
I think you can do the following (so long as nothing happened in between):
MESSAGE,/REISSUE_LAST
assuming you have IDL version greater than 6.0. If not, then you can just go into the routine, modify it by defining a keyword that returns the message if it was printed to the screen, otherwise it returns nothing.

honeste_vivere
- 308
- 5
- 11