Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 234)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 235)
@@ -3311,4 +3311,19 @@
     while (it != mCallbacks.end())
         (*it++)->OnKeyboardLedsChange(fNumLock, fCapsLock, fScrollLock);
+}
+
+/**
+ *  @note Locks this object for reading.
+ */
+void Console::onRuntimeError (BOOL aFatal, INPTR BSTR aErrorID, INPTR BSTR aMessage)
+{
+    AutoCaller autoCaller (this);
+    AssertComRCReturnVoid (autoCaller.rc());
+
+    AutoReaderLock alock (this);
+
+    CallbackList::iterator it = mCallbacks.begin();
+    while (it != mCallbacks.end())
+        (*it++)->OnRuntimeError (aFatal, aErrorID, aMessage);
 }
 
@@ -5322,13 +5337,17 @@
 #undef STR_CONV
 
-    /*
-     * Register VM state change handler
-     */
-    rc = VMR3AtStateRegister(pVM, Console::vmstateChangeCallback, pConsole);
-    AssertRC (rc);
-
-    /*
-     * Save the VM pointer in the machine object.
-     */
+    /* Register VM state change handler */
+    int rc2 = VMR3AtStateRegister (pVM, Console::vmstateChangeCallback, pConsole);
+    AssertRC (rc2);
+    if (VBOX_SUCCESS (rc))
+        rc = rc2;
+
+    /* Register VM runtime error handler */
+    rc2 = VMR3AtRuntimeErrorRegister (pVM, Console::setVMRuntimeErrorCallback, pConsole);
+    AssertRC (rc2);
+    if (VBOX_SUCCESS (rc))
+        rc = rc2;
+
+    /* Save the VM pointer in the machine object */
     pConsole->mpVM = pVM;
 
@@ -5709,14 +5728,44 @@
     AssertReturnVoid (task);
 
+    /* we ignore RT_SRC_POS_DECL arguments to avoid confusion of end-users */
     HRESULT hrc = setError (E_FAIL, tr ("%N.\n"
-                                        "At '%s' (%d) in %s.\n"
-                                        "VBox status code: %d %Vrc\n"),
+                                        "VBox status code: %d (%Vrc)"),
                                     tr (pszFormat), &args,
-                                    pszFile, iLine, pszFunction,
                                     rc, rc);
     task->mProgress->notifyComplete (hrc);
 }
 
-
+/**
+ * VM runtime error callback function.
+ * See VMSetRuntimeError for the detailed description of parameters.
+ *
+ * @param   pVM             The VM handle.
+ * @param   pvUser          The user argument.
+ * @param   fFatal          Whether it is a fatal error or not.
+ * @param   pszErrorID      Error ID string.
+ * @param   pszFormat       Error message format string.
+ * @param   args            Error message arguments.
+ * @thread EMT.
+ */
+/* static */ DECLCALLBACK(void)
+Console::setVMRuntimeErrorCallback (PVM pVM, void *pvUser, bool fFatal,
+                                    const char *pszErrorID,
+                                    const char *pszFormat, va_list args)
+{
+    LogFlowFuncEnter();
+
+    Console *that = static_cast <Console *> (pvUser);
+    AssertReturnVoid (that);
+
+    Utf8Str message = Utf8StrFmt (pszFormat, args);
+
+    LogRel (("Console: VM runtime error: fatal=%RTbool, "
+             "errorID=%s message=\"%s\"\n",
+             fFatal, pszErrorID, message.raw()));
+
+    that->onRuntimeError (BOOL (fFatal), Bstr (pszErrorID), Bstr (message)); 
+
+    LogFlowFuncLeave();
+}
 
 /**
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 234)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 235)
@@ -2435,5 +2435,5 @@
                     <li><i>fatal</i></li>
                     <li><i>non-fatal with retry</i></li>
-                    <li><i>non-fatal without retry</i></li>
+                    <li><i>non-fatal warnings</i></li>
                 </ul>
                 
@@ -2446,8 +2446,8 @@
                 Resuming the execution can lead to unpredictable results.
                 
-                <b>Non-fatal</b> errors are indicated by the
+                <b>Non-fatal</b> errors and warnings are indicated by the
                 @a fatal parameter set to <tt>false</tt>. If the virtual machine
                 is in the Paused state by the time the error notification is
-                received, it means that the user can retry the machine
+                received, it means that the user can <i>try to resume</i> the machine
                 execution after attempting to solve the probem that caused the
                 error. In this case, the notification handler is supposed
@@ -2458,7 +2458,7 @@
                 the machine execution using the <link to="IConsole::resume()"/>
                 call. If the machine execution is not Paused during this
-                notification, then it means this notification is a warning (for
-                example, about a fatal condition that can happen very soon); no
-                any immediate action is required from the user, the machine
+                notification, then it means this notification is a <i>warning</i>
+                (for example, about a fatal condition that can happen very soon);
+                no immediate action is required from the user, the machine
                 continues its normal execution.
 
@@ -2471,7 +2471,7 @@
                 Currently, the following error identificators are known:
                 <ul>
-                <li>"HostMemoryLow"</li>
-                <li>"HostAudioNotResponding"</li>
-                <li>"VDIStorageFull"</li>
+                <li><tt>"HostMemoryLow"</tt></li>
+                <li><tt>"HostAudioNotResponding"</tt></li>
+                <li><tt>"VDIStorageFull"</tt></li>
                 </ul>
 
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 234)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 235)
@@ -189,5 +189,6 @@
     void onAdditionsStateChange();
     void onAdditionsOutdated();
-    void onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
+    void onKeyboardLedsChange (bool fNumLock, bool fCapsLock, bool fScrollLock);
+    void onRuntimeError (BOOL aFatal, INPTR BSTR aErrorID, INPTR BSTR aMessage);
 
     static const PDMDRVREG DrvStatusReg;
@@ -375,4 +376,9 @@
                         const char *pszFormat, va_list args);
 
+    static DECLCALLBACK(void)
+    setVMRuntimeErrorCallback (PVM pVM, void *pvUser, bool fFatal,
+                               const char *pszErrorID,
+                               const char *pszFormat, va_list args);
+
     HRESULT                     captureUSBDevices (PVM pVM);
     void                        releaseAllUSBDevices (void);
