mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-24 17:29:22 +00:00
Tweak error reporting
This commit is contained in:
parent
7b70767a1f
commit
13c38be4aa
@ -90,12 +90,7 @@ void ExtractOptionsDialog::DoDataExchange(CDataExchange* pDX)
|
||||
|
||||
if (pDX->m_bSaveAndValidate) {
|
||||
if (!fIncludeDataForks && !fIncludeRsrcForks && !fIncludeDiskImages) {
|
||||
CString appName, errMsg;
|
||||
|
||||
CheckedLoadString(&appName, IDS_MB_APP_NAME);
|
||||
|
||||
CheckedLoadString(&errMsg, IDS_NO_FORKS_SPECIFIED);
|
||||
MessageBox(errMsg, appName, MB_OK);
|
||||
ShowFailureMsg(this, IDS_NO_FORKS_SPECIFIED, IDS_MB_APP_NAME);
|
||||
pDX->Fail();
|
||||
return;
|
||||
}
|
||||
|
@ -388,12 +388,22 @@ void GetWin32ErrorString(DWORD err, CString* pStr)
|
||||
|
||||
void ShowFailureMsg(CWnd* pWnd, const CString& msg, int titleStrID)
|
||||
{
|
||||
CString failed;
|
||||
CString title;
|
||||
|
||||
CheckedLoadString(&failed, titleStrID);
|
||||
pWnd->MessageBox(msg, failed, MB_OK | MB_ICONERROR);
|
||||
CheckedLoadString(&title, titleStrID);
|
||||
pWnd->MessageBox(msg, title, MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
void ShowFailureMsg(CWnd* pWnd, int msgId, int titleStrID)
|
||||
{
|
||||
CString msg, title;
|
||||
|
||||
CheckedLoadString(&title, titleStrID);
|
||||
CheckedLoadString(&msg, msgId);
|
||||
pWnd->MessageBox(msg, title, MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
|
||||
bool IsWin9x(void)
|
||||
{
|
||||
OSVERSIONINFO osvers;
|
||||
|
@ -181,6 +181,12 @@ void GetWin32ErrorString(DWORD err, CString* pStr);
|
||||
*/
|
||||
void ShowFailureMsg(CWnd* pWnd, const CString& msg, int titleStrID);
|
||||
|
||||
/*
|
||||
* Post a failure message in a message box.
|
||||
*/
|
||||
void ShowFailureMsg(CWnd* pWnd, int msgId, int titleStrID);
|
||||
|
||||
|
||||
/*
|
||||
* Returns "true" if we're running on Win9x (Win95, Win98, WinME), "false"
|
||||
* if not (could be WinNT/2K/XP or even Win31 with Win32s).
|
||||
|
Loading…
Reference in New Issue
Block a user