sociomantic-tsunami / tangort

Tango D1 runtime library
Other
0 stars 9 forks source link

Option for assertion behaviour in D2 builds to match that of D1 builds #19

Open gavin-norman-sociomantic opened 7 years ago

gavin-norman-sociomantic commented 7 years ago

Assertions in D1 throw an Exception-derived class which may be caught by a normal catch ( Exception ) block. All of our code (library and application) is written to handle this as needed.

In D2, however, assertions throw an Error-derived class. This means that all our carefully crafted exception handling code suddenly misses this extremely important class of errors.

This is a major behavioural change and means that we cannot, in my opinion, safely run D2 builds of applications.

During the transitional period, we need a way to make assert / exception handling in D2 builds behave in the same way as in D1 builds, without the need to modify library or application code.

gavin-norman-sociomantic commented 7 years ago

(Labelled with prio-high as we have D2-built applications running live which will certainly be affected by this. It's currently kind of a timebomb waiting to go off.)

gavin-norman-sociomantic commented 7 years ago

Some discussion on this topic led to https://github.com/sociomantic-tsunami/ocean/issues/212, which is generally the favoured solution.