Allow for custom exception types, rather than just Text