[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OOC Core Library
> Just tell me how to raise an exception and it can be done.
>
> Here is how it's done by the Modula-2 DIS. M2 allows to add an
> exception handling part to the body of a procedure block. If we
> replace that by a mechanism to install a procedure as an exception
> handler (similar to signal handlers in Unix), we may have a usable
> concept.
>
> -- mva
[snip]
Josef Templ actually defines an exception handling mechanism in his OFront
product. Maybe we could steal some of his ideas? He basically installs
an exception handler in his SYSTEM module which get called by a HALT with
negative numbers. This seems a lot simpler than the elaborate Modula-3
mechanism. Templ also defines lock variables to protect regions that are
not reentrant (e.g., X11 library contains non-reentrant procedures).
Each back-end would be free to implement the exception handler hook as they
require.
Michael G.