ExpressionOperator.cpp
Is it possible to catch an exception during the evaluation of operator, and
try something else with the same arguments ?
According to my tests, surrounding by catch/try is not enough.
The evaluation stack is probably in a bad state in the catch{}, I don't
know how to bring it back to a good state.
I tried to do like the catch in RexxActivation::run, but without success
(unwindToFrame and stack.clear).
The "something else" is an alternate way to find a candidate
implementation, where the dispatching is not limited to the first argument.
Thanks.
Jean-Louis
RexxObject *RexxBinaryOperator::evaluate(
RexxActivation *context, /* current activation context
*/
RexxExpressionStack *stack ) /* evaluation stack
*/
/******************************************************************************/
/* Function: Execute a REXX binary
operator */
/******************************************************************************/
{
/* evaluate the target */
RexxObject *left = this->left_term->evaluate(context, stack);
/* evaluate the right term */
RexxObject *right = this->right_term->evaluate(context, stack);
* try
{
* /* evaluate the message */
RexxObject *result = callOperatorMethod(left, this->oper, right);
/* replace top two stack elements */
stack->operatorResult(result); /* with this
one */
/* trace if
necessary */
context->traceOperator(operatorName(), result);
return result; /* return the
result */
* }
catch (RexxActivation *t)
{
// try something else with the same arguments left and right
}
*}
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel