I'd prefer `raise RuntimeError(...)`. Asserts are generally for situations that should never occur (e.g. pre-conditions that are enforced by some controlled manner external to the call).