I read a sentence in a book, as following:
This feature is useful when constructing Boolean expressions in which we first test that a certain condition holds (such as reference not being None), and then test a condition that could have otherwise generated an error condition had the prior test not succeeded.
I could not understand the bold in the sentence in the way of grammar. I think it should be " an error condition that can have the prior test not succeeded", am I right?