Raise errors instead of returning error codes