Fix @expectedException issue

Namely:
```
InvalidArgumentException: You must not expect the generic exception class.
```

Not very clean, but the tests throw an error on my laptop otherwise.
Catching a generic \Exception isn't really clean either …

@DeepDiver1975 @icewind1991