Turn lda and qda warnings into exceptions so that they can be handled as
exceptions.