1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| void CInterbaseManager::Display( Exception^ exception)
{ // 1
std::string terme1;
std::string terme2;
std::string terme3;
std::string ErrorString;
const char* ErrorT;
const wchar_t* chars;
System::String^ ErrorMessage;
std::wstring result;
terme1 = "Index #";
terme2 = "\n";
terme3 = "Error: ";
ErrorMessage = exception->Message;
chars = (const wchar_t*)(Marshal::StringToHGlobalUni( ErrorMessage)).ToPointer();
result.append( chars);
Marshal::FreeHGlobal(IntPtr((void*)chars));
char* s = CStrConv::awcstombs( (wchar_t*)result.c_str());
ErrorT = s;
CStrConv::StrFreeA( s);
ErrorString = terme1 + terme2 + terme3 + ErrorT + terme2;
// edit( char* final_err_buff )
edit( (char*)ErrorString.c_str());
}; // 1 |