Make construction of exceptions more obvious.

This was previously relying on the behaviour of the raise keyword when
given a second argument.  This made it quite hard to see where the
message string was coming from when looking at the exception classes.
Passing it in the constructor makes this clearer.