Boriss Mejias wrote:
I was wondering about the difference between exceptions raised by
dictionaries and arrays. I'm looking at the code of the builtins, and
exceptions raised by arrays due to out-of-range indexes are built as
follows (look at platform/emulator/builtins.cc lines 402 and 424):

oz_raise(E_ERROR,E_KERNEL,"array",2,array,index);

but dictionaries used a different flag (look at
platform/mulator/dictionaries.cc lines 611 and 643):

oz_raise(E_SYSTEM,E_KERNEL,"dict",2,d,k);

My question is: Why does dictionaries need E_SYSTEM flag instead of
E_ERROR??

That's a bug. The principles are documented here: http://www.mozart-oz.org/documentation/tutorial/node5.html#control.sysexcept

Cheers,
raph

_________________________________________________________________________________
mozart-hackers mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-hackers

Reply via email to