Raise an exception in case of failure