I marked this, because it was not consistent with behavior in other places, where a callback is not called before throwing an error. Otherwise, we might risk calling the callback twice.