Revise the way we raise errors to be more python-like.