gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Gm2] cath exceptions raised in another module's init section


From: Breeden, Thomas (tmb)
Subject: RE: [Gm2] cath exceptions raised in another module's init section
Date: Wed, 6 Jan 2010 11:16:35 -0500

Remember that by definition the init sections of imported modules are executed 
before the init section of the modules that import them (barring circularities).

So the initialization of the importing module has not even started when this 
exception occurs. I'd have to check ISO to be sure, but it seems iffy to 
transfer control to the exception part of a section that has not even started.

Tom
address@hidden

> -----Original Message-----
> From: address@hidden [mailto:gm2-
> address@hidden On Behalf Of Martin Kalbfuß
> Sent: January 06, 2010 8:49 AM
> To: GNU Modula-2
> Subject: [Gm2] cath exceptions raised in another module's init section
> 
> Hi again.
> 
> I tried the following:
> 
> I raised an exception in the initialization section of an imported
> module. Then I tried to catch this exception in the importing main
> module. This didn't work. Is this the way it should be? When I throw an
> exception in any other imported function, I can catch it in the
> importing module.
> 
> I have the function InitSubSystem. It can fail. So I have to call it by
> hand, to catch the exception. But the right place to put them would be
> the initialization section of the SubSystem's module.
> 
> Thanks,
> 
> --
> Martin Kalbfuß <address@hidden>
> 
> 
> 
> _______________________________________________
> gm2 mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gm2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]