A handy helper to make testing whether an error was thrown just a little bit nicer