Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

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

Open
gavin-norman-sociomantic opened this issue Aug 15, 2017 · 2 comments

Comments

@gavin-norman-sociomantic
Copy link

gavin-norman-sociomantic commented Aug 15, 2017

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
Copy link
Author

(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
Copy link
Author

Some discussion on this topic led to sociomantic-tsunami/ocean#212, which is generally the favoured solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant