Open gavin-norman-sociomantic opened 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.)
Some discussion on this topic led to https://github.com/sociomantic-tsunami/ocean/issues/212, which is generally the favoured solution.
Assertions in D1 throw an
Exception
-derived class which may be caught by a normalcatch ( 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.