This means that only one place needs to work with warnings from the deprecation of `std::uncaught_exception()` in C++17. Closes #1162.