Inherit from the right exception to stay compatible with old code.