Commit b02fee73 authored by Max Kellermann's avatar Max Kellermann

util/PrintException: support "const char *"

parent 424f75c9
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment