all: improve tests

This commit is contained in:
Markus F.X.J. Oberhumer
2024-04-16 15:20:56 +02:00
parent 35c6a200ad
commit 1d2b276425
11 changed files with 249 additions and 216 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ void printErr(const char *iname, const Throwable &e) noexcept {
char buf[1024];
size_t l;
upx_safe_snprintf(buf, sizeof(buf), "%s", prettyName(typeid(e).name()));
upx_safe_snprintf(buf, sizeof(buf), "%s", prettyExceptionName(typeid(e).name()));
l = strlen(buf);
if (l < sizeof(buf) && e.getMsg())
upx_safe_snprintf(buf + l, sizeof(buf) - l, ": %s", e.getMsg());
@@ -144,7 +144,7 @@ void printWarn(const char *iname, const char *format, ...) noexcept {
void printUnhandledException(const char *iname, const std::exception *e) noexcept {
if (e != nullptr)
printErr(iname, "unhandled exception: %s\n", prettyName(e->what()));
printErr(iname, "unhandled exception: %s\n", prettyExceptionName(e->what()));
else
printErr(iname, "internal error: unhandled exception!\n");
if (opt->cmd != CMD_COMPRESS) {