Update error.h

This commit is contained in:
BLUELOVETH 2023-02-11 19:59:28 +08:00 committed by GitHub
parent ac9640f73e
commit e02429365e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}
};
}
}