Priority error message fix: issue #505

Using the code @neezer presented verbatim, since he didn't have time to submit a PR. I needed this code as well, so it would be great to be in the main branch.

This will grab the highest priority error message and only display that one.