Some of this stuff is already tested properly in the name and message
prototype tests, so let's focus on covering all error types here as well
instead.
Otherwise these will get their name/default message from the Error
prototype, and as a result would always just say "Error" in error
messages, not the specific type.
Something I missed in da177c6, now with tests. :^)