void ThrowStdRuntimeErrorU(const wchar_t* file, int line, const wchar_t* err_msg) { char lineStr[64]; _itoa(line,lineStr,10); std::string fileName = ToNarrowString(file); std::string errMsg = ToNarrowString(err_msg); throw std::runtime_error( std::string("file: ") + fileName + std::string(", line: ") + lineStr + std::string(": ") + errMsg); }
std::string ToNarrowString(const std::wstring& str) { return ToNarrowString(str.c_str(), -1); }