- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
read (string, '(i)', iostat=status) number
and there is an error, about all you can say is
if (status .ne. 0) type *, 'RTL error ', iostat
You can use ERRSNS in many cases where an underlying Win32 I/O routine was used but not in all cases. If the second parameter is zero then you essentially have no error message to retrieve, as in the case above.
What I am looking for is something like under the OVMS compiler where you have message numbers defined in $FORDEF that correspond to the iostat values, such that you can do an ERRSNS(,,,,status) and lookup the message according to that return value, which is one of the FOR$_xxx constants defined for $FORDEF. This way we could go ahead and use ForrmatMessage and return an appropriate error message in a controlled fashion.
I ask because I was once quoted telling someone that we are past the days where we have to look up numeric error codes to determine what went wrong at runtime. :-)
James
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I missed that one as it wasn't in my OVMS documentation. It does have the problem in that it isn't portable between the OS's which is often a goal of mine. Is there any possibility of seeing status codes suitable for a FormatMessage call show up somewhere, perhaps the fifth parameter of ERRSNS and defined in FORDEF?
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your best bet is to write a VMS implementation of GERROR - pretty easy with $GETMSG.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
James
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page