I'm a bit confused in regards to a and an and I hope to clear that confusion.
I've the following sentence:

    ... was incomplete or a nonaborting error occured .....

The "a" there is where I'm confused. Normally from what I remember it is so that "an" is only used if the next word begins with a,e,i,o,u so from what I remember "a" would be correct there but my gut tells me "an" should be there as the "a" refers to error and not nonaborting.

So my question there is am I correct there or is my gutfeeling correct and if so why?