Пример #1
0
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);
}  
Пример #2
0
 std::string ToNarrowString(const std::wstring& str) {
   return ToNarrowString(str.c_str(), -1);
 }