Replace an `assert` with a conditional throw
The assert is reachable, resulting in a brutal abort
in debug mode instead of a nice exception, and in weird behaviour in releases.
Edited by jvoisin
The assert is reachable, resulting in a brutal abort
in debug mode instead of a nice exception, and in weird behaviour in releases.