8
可変メッセージでstd :: exceptionsをスローする方法は?
これは、例外に情報を追加したいときによく行うことの例です。 std::stringstream errMsg; errMsg << "Could not load config file '" << configfile << "'"; throw std::exception(errMsg.str().c_str()); それを行うより良い方法はありますか?