diff options
| author | Martin Hořeňovský | 2020-05-19 21:23:35 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-20 08:15:27 +0200 |
| commit | 4394d3ae65e076c749dc95a27f3178b94ba09e94 (patch) | |
| tree | 910c1ab3aa13847da7a5dacef60a258483337e8d /docs | |
| parent | 4b2f1da02a37d111b572551f4bd8ed765b06ca28 (diff) | |
| download | catch3-4394d3ae65e076c749dc95a27f3178b94ba09e94.tar.gz | |
Translate exceptions by const reference instead of plain ref
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tostring.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tostring.md b/docs/tostring.md index 156c895a..87a0caf0 100644 --- a/docs/tostring.md +++ b/docs/tostring.md @@ -64,7 +64,7 @@ namespace Catch { By default all exceptions deriving from `std::exception` will be translated to strings by calling the `what()` method. For exception types that do not derive from `std::exception` - or if `what()` does not return a suitable string - use `CATCH_TRANSLATE_EXCEPTION`. This defines a function that takes your exception type, by reference, and returns a string. It can appear anywhere in the code - it doesn't have to be in the same translation unit. For example: ```cpp -CATCH_TRANSLATE_EXCEPTION( MyType& ex ) { +CATCH_TRANSLATE_EXCEPTION( MyType const& ex ) { return ex.message(); } ``` |