- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there an "OnError" function like Visual Basic so you can control a Runtime error?
So you could have a button to get the users to send an email of the error message.
I know you can heve ERR in commands.
Thanks,
David
So you could have a button to get the users to send an email of the error message.
I know you can heve ERR in commands.
Thanks,
David
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, there is not an equivalent. You should read the chapter on error handling in the Building Applications manual to see what is available to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
The chapter Steve recommends on error handling is very useful. The available error trapping options like ERR, END, STAT, etc. are very useful to catch run-time errors.
We use mixed VB and Fortran in our software and have had to devise additional steps for error trapping. Since a DLL cannot write to the "screen" we use both a text log file for error messages and a message string that is passed from the DLL back to the calling routine. Then we can give helpful advice to the user or instructions on submitting an error report to us. In addition to the error trapping available in the intrinsic routines, our additional data checking to avoid division by zero or the square root of -1, we update the error message string and use a GO TO statement to jump to the end of the routine to gracfully exit the routine (deallocate local arrays, close files) and then exit the DLL.
Regards,
Greg
The chapter Steve recommends on error handling is very useful. The available error trapping options like ERR, END, STAT, etc. are very useful to catch run-time errors.
We use mixed VB and Fortran in our software and have had to devise additional steps for error trapping. Since a DLL cannot write to the "screen" we use both a text log file for error messages and a message string that is passed from the DLL back to the calling routine. Then we can give helpful advice to the user or instructions on submitting an error report to us. In addition to the error trapping available in the intrinsic routines, our additional data checking to avoid division by zero or the square root of -1, we update the error message string and use a GO TO statement to jump to the end of the routine to gracfully exit the routine (deallocate local arrays, close files) and then exit the DLL.
Regards,
Greg
![](/skins/images/E799062D82CA2A220ED12C6FD1960495/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page