Raise an exception if no callback is provided