Add a way to generate a test exception