replace exceptions by asserts (with optional assert_handler plugin)