doomconfig/snippets/c++-mode/exception

18 lines
317 B
Plaintext
Raw Permalink Normal View History

2025-06-28 19:31:23 +02:00
# -*- mode: snippet -*-
# name: exception
# key: exception
# condition: t
# --
class $0Exception : public std::exception {
private:
std::string m_message;
public:
$0Exception(const char* message) :
m_message(message) {}
const char* what() const noexcept {
return m_message.c_str();
}
};