Stupid programmer error. I was supposed to set a member of an object to a specific constant when an error happens, but I didn't call the setter with the constant. Duh…