diff --git a/src/util/PrintException.cxx b/src/util/PrintException.cxx index 54ea71c07..0e1971077 100644 --- a/src/util/PrintException.cxx +++ b/src/util/PrintException.cxx @@ -42,6 +42,8 @@ PrintException(const std::exception &e) noexcept std::rethrow_if_nested(e); } catch (const std::exception &nested) { PrintException(nested); + } catch (const char *s) { + fprintf(stderr, "%s\n", s); } catch (...) { fprintf(stderr, "Unrecognized nested exception\n"); } @@ -54,6 +56,8 @@ PrintException(const std::exception_ptr &ep) noexcept std::rethrow_exception(ep); } catch (const std::exception &e) { PrintException(e); + } catch (const char *s) { + fprintf(stderr, "%s\n", s); } catch (...) { fprintf(stderr, "Unrecognized exception\n"); }