Use `fail` instead of `raise` to signal exceptions.