|
Hi,
I read an atricle a while back which put forward the idea of emulating
try/catch blocks by using the message APIs.
The kind of thing I'm looking at is the possibility of wrapping a call to a
procedure in a monitor block and within the called procedure, upon certain
conditions, send a message up the stack to force the monitor group to
activate a particular on-error condition.
Sort of...
/free
monitor;
// process task...
processTask();
on-error TASK_HALTED;
someCode();
on-error TASK_SUSPENDED;
someOtherCode();
on-error;
inTrouble();
endmon;
/end-free
and in processTask...
/free
if haltTaskConditionMet();
throw('MSG0001');
endif;
if suspendTaskConditionMet();
throw('MSG0002');
endif;
/end-free
Is this possible? Where would I find examples for this kind of thing? Does
my question make any sense at all?
Cheers
Larry Ducie
This mailing list archive is Copyright 1997-2026 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.