×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 2014-08-20 14:13, Roger Harman wrote:
Yes, I am guilty of not checking %error and/or %status. Sadly, probably the majority of us are.
Hi Roger, assuming you're coding the (e) so your procedure will end
normally, consider leaving out the (e) and putting your code in a
MONITOR. That way, you won't continue after an error occurs, and you
won't clutter up your code with checks of %error and %status.
Instead of coding like this (or worse, leaving out the %error checks)
setll(e) ...
if %error;
error handling;
endif;
read(e) ...
if %error;
error handling;
endif;
etc ...
code like this instead:
monitor;
setll ...
read ...
etc ...
on-error
do all your error handling here
endmon;
Or, just leave out the (e) and the monitor and let your procedure crash
so some other procedure up the line can handle it the error. That's
often the best way to proceed. If your procedure ends "normally" but it
actually had an error, it might need some way to tell its caller that it
failed. When a procedure lets the caller get its exceptions, it can make
it much easier to tell the caller that the procedure failed.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.