Should also test the right code is in the exception.