An exception is fine if the language has them. I don't think "assert" was meant super literally and exactly the way C does it.

An error code is risky.