Opened 14 years ago

Last modified 14 years ago

#1290 closed defect (fixed)

fail() causes compiler to exit

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Interactive Environment Version:
Keywords: Cc: Martin Sjölund, Martin Sjölund

Description

Using dynamic loading of functions that fail() causes the compiler to exit with a thrown exception. This should be caught. However, Ceval also must not call the function again, so a result Values.META_FAIL() should be returned. This is necessary for future optimizations (and interpretation/ceval of matchcontinue expressions), and for providing good error messages if a constant is bound to a call that fail()'ed.

{{{function func

input Integer i;
output Integer b;

algorithm

b := match (i)

case (_) then fail();

end match;

end func;}}}

Change History (0)

Note: See TracTickets for help on using tickets.