SLATOR(MyType& ex) {
    return doctest::String(ex.message());
}
```

Note that the exception may be accepted without a reference but it is considered bad practice in C++.

An alternative way to register an exception translator is to do the following in some function - before executing any tests:

```
    // adding a lambda - the signature required is `doctest::String(exception_type)`
    doctest::registerExceptionTranslator<int>([](int in){ return doctest::toString(in); });
```

The order of registering ex