Changes the `toThrow` matcher to manage Exception code.