Update internal error messages

This commit is contained in:
Jeremy 2024-03-31 14:18:21 -05:00
parent 8007413ff6
commit b04fc09682
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -20,9 +20,9 @@ namespace detail {
class internal_error : public std::exception {
std::string msg;
public:
internal_error(std::string message) : msg(std::move(message)) {}
internal_error(std::string message) : msg("Cpptrace internal error: " + std::move(message)) {}
template<typename... Args>
internal_error(const char* format, Args&&... args) : msg(microfmt::format(format, args...)) {}
internal_error(const char* format, Args&&... args) : internal_error(microfmt::format(format, args...)) {}
const char* what() const noexcept override {
return msg.c_str();
}