add a rethrowUnlessLenient() method to avoid repeated code