From e02429365e1af10bdcb0ea7882cb8e5e0d25a561 Mon Sep 17 00:00:00 2001 From: BLUELOVETH Date: Sat, 11 Feb 2023 19:59:28 +0800 Subject: [PATCH] Update error.h --- src/error.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.h b/src/error.h index f557dc79..9fc76949 100644 --- a/src/error.h +++ b/src/error.h @@ -86,9 +86,9 @@ public: StrStream ss; if(is_re) ss << "Traceback (most recent call last):\n"; while(!st.empty()) { ss << st.top() << '\n'; st.pop(); } - if (msg.compare("") != 0) ss << type << ": " << msg; + if (!msg.empty()) ss << type << ": " << msg; else ss << type; return ss.str(); } }; -} \ No newline at end of file +}