Notify user if the we fail to parse the type.

This commit is contained in:
Rene Gollent 2013-04-13 17:23:53 -04:00
parent 8598af7ec9
commit 692d2db52a

View File

@ -13,6 +13,7 @@
#include <debugger.h>
#include <Alert.h>
#include <Looper.h>
#include <PopUpMenu.h>
#include <ToolTip.h>
@ -1488,6 +1489,13 @@ VariablesView::MessageReceived(BMessage* message)
if (language->ParseTypeExpression(typeExpression,
fThread->GetTeam()->DebugInfo(), type) != B_OK) {
BString errorMessage;
errorMessage.SetToFormat("Failed to resolve type %s",
typeExpression.String(), strerror(result));
BAlert* alert = new(std::nothrow) BAlert("Error",
errorMessage.String(), "Close");
if (alert != NULL)
alert->Go();
break;
}