Formatting rules for exception messages

Florian Weimer fw at
Mon Mar 25 12:24:37 UTC 2019

Are there any guidelines for formatting exception messages?

In particular, I'm interested in the case when the exception message
is a (clipped) sentence.  Is it supposed to start with a capital

If the message refers to a parameter name, the spelling should reflect
the name exactly, of course.  There seems to be a slight bias towards
capitalization, based on a few greps.  Consider this:

$ LC_ALL=C grep -r 'Exception("[A-Z][^" ]*ing '  src/*/share/classes/ | wc -l
$ LC_ALL=C grep -r 'Exception("[a-z][^" ]*ing '  src/*/share/classes/ | wc -l

More information about the core-libs-dev mailing list