[commit] r1189 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Feb 17 11:57:50 CST 2011
Author: ksmyth
Date: Thu Feb 17 11:57:50 2011
New Revision: 1189
Log:
Better error messages
Modified:
trunk/GME/Gme/GMEView.cpp
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Thu Feb 17 11:57:26 2011 (r1188)
+++ trunk/GME/Gme/GMEView.cpp Thu Feb 17 11:57:50 2011 (r1189)
@@ -3775,9 +3775,11 @@
}
*/
}
- catch(hresult_exception e) {
+ catch (hresult_exception& e) {
AbortTransaction(e.hr);
-// AfxMessageBox("Unable to insert objects",MB_ICONSTOP | MB_OK); // in most cases there was an error msg already...
+ _bstr_t err;
+ GetErrorInfo(e.hr, err.GetAddress());
+ AfxMessageBox((std::string("Unable to insert objects: ") + static_cast<const char*>(err)).c_str(), MB_ICONSTOP | MB_OK); // in most cases there was an error msg already...
newObjectIDs.RemoveAll();
}
return false;
@@ -3826,9 +3828,11 @@
return false;
}
}
- catch(hresult_exception e) {
+ catch(hresult_exception& e) {
AbortTransaction(e.hr);
- AfxMessageBox("Unable to insert objects",MB_ICONSTOP | MB_OK);
+ _bstr_t err;
+ GetErrorInfo(e.hr, err.GetAddress());
+ AfxMessageBox((std::string("Unable to insert objects: ") + static_cast<const char*>(err)).c_str(), MB_ICONSTOP | MB_OK);
CGMEEventLogger::LogGMEEvent(" Unable to insert objects.\r\n");
newObjectIDs.RemoveAll();
Reset(true); //BGY
More information about the gme-commit
mailing list