Improve error checking and error reporting in java.util.Formatter.

This causes three new harmony failures, in tests specifically designed to
probe exception priorities (despite the fact that the RI explicitly doesn't
define exception priorities).

Comically, this same change actually fixes 24 jtreg tests that were failing
because of differences in exception priorities between harmony and the RI.

What I care about is that the new code is way easier to understand, shouldn't
waste as much space in our puny instruction caches, should be a more tempting
JIT target, and lets the actual formatting code assume that it's only ever
called in a valid way.

Bug: 2477140
1 file changed