Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2016 (new defect)

Opened 13 years ago

throwing in a module initializer silently aborts all the following initializers

Reported by: fawzi Assigned to: community
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: Cc:

Description

I had alredy had some initializer weiredness, and I found out that throwing in a static initializers would silently abort all the following initializers, I did not fix tango because I was lazy, but now I came again across it, so I did:

http://www.dsource.org/projects/tango/changeset/5598

As it can be seen it simply prints out an error if an exception is catched.

I think that this is the right thing to do, because ignoring it is *very* dangerous, some initializers will not be called (and it is unclear which ones). Most likely the user will have problems later when using modules that were not initialized. So such a problem is something very serious that should be fixed, and not ignored.

I would argue that we could even exit(1);

Anyway to be able to discuss this here is a ticket.