Fix bug with exception display

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@332 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
harrybharry 2008-09-30 15:44:34 +00:00
parent 8d4289a18d
commit 68a59eb3cb

View File

@ -293,7 +293,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR cmdLineAnsi, int nCmdSh
} catch (const Win32Exception & ex) {
TCHAR message[1024]; //TODO: sane number
wsprintf(message, TEXT("An exception occured. Notepad++ cannot recover and must be shut down.\r\nThe exception details are as follows:\r\n")
#ifdef UNICODE
TEXT("Code:\t0x%08X\r\nType:\t%S\r\nException address: 0x%08X"),
#else
TEXT("Code:\t0x%08X\r\nType:\t%s\r\nException address: 0x%08X"),
#endif
ex.code(), ex.what(), ex.where());
::MessageBox(NULL, message, TEXT("Win32Exception"), MB_OK | MB_ICONERROR);
doException(notepad_plus_plus);