我的 main 函数中有一条 try catch 语句
try
{
app.init();
}
catch(std::string errorMessage)
{
std::cout << errorMessage;
return 1;
}
但是当我throw "SOME_ERROR";
的控制台输出很简单
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)
如何将 errorMessage 输出到控制台?