[Aldor-l] Exceptions in aldor
Ralf Hemmecke
ralf at hemmecke.de
Fri Mar 31 06:10:33 EST 2006
On 03/31/2006 12:49 PM, W Naylor wrote:
> In particular, I notice the last example in chapter 11 of the aldor user
> guide defines a couple of Categorys extending 'Exception'. As far as I can
> make out the Category Exception does not exist
That is right. All the Exceptions in libaldor are just of type
Category if they end in "ExceptionType" (some kind of convention) and
ordinary domains if you see
SOMEException: SOMEExceptionType == add {...}
(Of course you can have paremeters and everything.)
So exceptions are domains and their types are categories. There is
actually no language defined type "Exception".
I haven't tried, but I belief, it would be perfectly possible to say
something like
try {
throw Integer;
} catch E in {
E has Monoid => foo();
}
Maybe one of the Aldor developers could say more.
Ralf
More information about the Aldor-l
mailing list