assert(false) when exceptions are thrown in debug builds

This helps with finding out the cause of the problem quicker when
developing.

It is still possible to throw exceptions if requested explicitly (e.g.
for testing)