Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45312)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45313)
@@ -412,20 +412,21 @@
 }
 
-void UIMessageCenter::cannotOpenSession(const CMachine &machine, const CProgress &progress /* = CProgress() */) const
-{
-    /* Format error-info: */
-    Assert(!machine.isOk() || !progress.isNull());
-    QString strErrorInfo = !machine.isOk() ? formatErrorInfo(machine) :
-                           !progress.isOk() ? formatErrorInfo(progress) :
-                           formatErrorInfo(progress.GetErrorInfo());
-    /* Compose machine name: */
-    QString strName = machine.GetName();
-    if (strName.isEmpty())
-        strName = QFileInfo(machine.GetSettingsFilePath()).baseName();
+void UIMessageCenter::cannotOpenSession(const CMachine &machine) const
+{
+    /* Preserve error-info: */
+    QString strErrorInfo = formatErrorInfo(machine);
     /* Show the message: */
     message(mainWindowShown(), MessageType_Error,
             tr("Failed to open a session for the virtual machine <b>%1</b>.")
-               .arg(strName),
+               .arg(machine.GetName()),
             strErrorInfo);
+}
+
+void UIMessageCenter::cannotOpenSession(const CProgress &progress, const QString &strMachineName) const
+{
+    message(mainWindowShown(), MessageType_Error,
+            tr("Failed to open a session for the virtual machine <b>%1</b>.")
+               .arg(strMachineName),
+            !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));
 }
 
@@ -603,5 +604,5 @@
             tr("Failed to remove the virtual machine <b>%1</b>.")
                .arg(machine.GetName()),
-            formatErrorInfo(progress.GetErrorInfo()));
+            !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45312)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45313)
@@ -208,5 +208,6 @@
     void cannotFindMachineById(const CVirtualBox &vbox, const QString &strId) const;
     void cannotOpenSession(const CSession &session) const;
-    void cannotOpenSession(const CMachine &machine, const CProgress &progress = CProgress()) const;
+    void cannotOpenSession(const CMachine &machine) const;
+    void cannotOpenSession(const CProgress &progress, const QString &strMachineName) const;
     void cannotGetMediaAccessibility(const UIMedium &medium) const;
     void cannotOpenURL(const QString &strUrl) const;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 45312)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 45313)
@@ -1727,42 +1727,55 @@
 CSession VBoxGlobal::openSession(const QString &strId, KLockType lockType /* = KLockType_Shared */)
 {
-    /* Create empty session instance: */
+    /* Prepare session: */
     CSession session;
-    session.createInstance(CLSID_Session);
-    if (session.isNull())
-    {
-        msgCenter().cannotOpenSession(session);
-        return session;
-    }
-
-    /* Search for the corresponding machine: */
-    CMachine machine = mVBox.FindMachine(strId);
-    if (machine.isNull())
-    {
-        msgCenter().cannotFindMachineById(mVBox, strId);
-        return session;
-    }
-
-    /* Lock found machine to session: */
-    machine.LockMachine(session, lockType);
-    if (!machine.isOk())
-    {
-        msgCenter().cannotOpenSession(machine);
+
+    /* Simulate try-catch block: */
+    bool fSuccess = false;
+    do
+    {
+        /* Create empty session instance: */
+        session.createInstance(CLSID_Session);
+        if (session.isNull())
+        {
+            msgCenter().cannotOpenSession(session);
+            break;
+        }
+
+        /* Search for the corresponding machine: */
+        CMachine machine = mVBox.FindMachine(strId);
+        if (machine.isNull())
+        {
+            msgCenter().cannotFindMachineById(mVBox, strId);
+            break;
+        }
+
+        /* Lock found machine to session: */
+        machine.LockMachine(session, lockType);
+        if (!machine.isOk())
+        {
+            msgCenter().cannotOpenSession(machine);
+            break;
+        }
+
+        /* Pass the language ID as the property to the guest: */
+        if (session.GetType() == KSessionType_Shared)
+        {
+            CMachine startedMachine = session.GetMachine();
+            /* Make sure that the language is in two letter code.
+             * Note: if languageId() returns an empty string lang.name() will
+             * return "C" which is an valid language code. */
+            QLocale lang(VBoxGlobal::languageId());
+            startedMachine.SetGuestPropertyValue("/VirtualBox/HostInfo/GUI/LanguageID", lang.name());
+        }
+
+        /* Success finally: */
+        fSuccess = true;
+    }
+    while (0);
+    /* Cleanup try-catch block: */
+    if (!fSuccess)
         session.detach();
-        return session;
-    }
-
-    /* Pass the language ID as the property to the guest: */
-    if (session.GetType() == KSessionType_Shared)
-    {
-        CMachine startedMachine = session.GetMachine();
-        /* Make sure that the language is in two letter code.
-         * Note: if languageId() returns an empty string lang.name() will
-         * return "C" which is an valid language code. */
-        QLocale lang(VBoxGlobal::languageId());
-        startedMachine.SetGuestPropertyValue("/VirtualBox/HostInfo/GUI/LanguageID", lang.name());
-    }
-
-    /* Return resulting session: */
+
+    /* Return session: */
     return session;
 }
@@ -4960,6 +4973,6 @@
     int iSpawningDuration = 60000;
     msgCenter().showModalProgressDialog(progress, machine.GetName(), "", mainWindow(), iSpawningDuration);
-    if (progress.GetResultCode() != 0)
-        msgCenter().cannotOpenSession(machine, progress);
+    if (!progress.isOk() || progress.GetResultCode() != 0)
+        msgCenter().cannotOpenSession(progress, machine.GetName());
 
     /* Unlock machine, close session: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 45312)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 45313)
@@ -1484,5 +1484,5 @@
             /* And show cleanup progress finally: */
             msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_delete_90px.png");
-            if (progress.GetResultCode() != 0)
+            if (!progress.isOk() || progress.GetResultCode() != 0)
             {
                 msgCenter().cannotRemoveMachine(machine, progress);
