[nem-en] implementation of Message.FatalError

Dmitry Ivankov divanorama at gmail.com
Sun Jun 17 16:21:07 CEST 2007


 It is
public FatalError['a] (loc : Location, m : string) : 'a
{
Message.Error (loc, m);
throw Recovery ()
}

Which is hacky a bit. For example when 'a is void we get void generic
specifier, which is happily not checked by PEVerify, but it's only now.
And
I suggest one of the following
1) implement smth like [always throw] attribute (don't like that idea)
2) analyze methods and add that attribute automatically (it's better,
probably will work even when method is some foreign Nemerle library)
3) Implement FatalError as a macro (i think it is the best way)
FatalError (args) {
<[ {
 smth;
 throw Recovery ();
} ]>
}
But how to make it bootstrap properly? Macros are compiled too
late, so boot update will be necessary?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070617/eb2ddf53/attachment.html


More information about the devel-en mailing list