VirtualBox

Changeset 53330 in vbox for trunk


Ignore:
Timestamp:
Nov 14, 2014 2:27:45 PM (10 years ago)
Author:
vboxsync
Message:

ConsoleImpl2.cpp: Replaced VERR_GENERAL_FAILURE with more specific status codes and associated Assert* with AssertLogRel*.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r53213 r53330  
    25972597/** @} */
    25982598
     2599/** @name Main API Status Codes
     2600 * @{
     2601 */
     2602/** The configuration constructor in main failed due to a COM error.  Check
     2603 * the release log of the VM for further details. */
     2604#define VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR      (-6400)
     2605/** The configuration constructor in main failed due to an internal consistency
     2606 *  error. Consult the release log of the VM for further details. */
     2607#define VERR_MAIN_CONFIG_CONSTRUCTOR_IPE            (-6401)
     2608/** @} */
     2609
    25992610
    26002611/* SED-END */
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r53222 r53330  
    529529    HRESULT             hrc;
    530530#define MAX_DEVICES     30
    531 #define H()     AssertMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE)
     531#define H()     AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
    532532
    533533    LONG lPortLUN[MAX_BIOS_LUN_COUNT];
     
    785785    LogFlowFuncEnter();
    786786
    787     AssertReturn(pvConsole, VERR_GENERAL_FAILURE);
     787    AssertReturn(pvConsole, VERR_INVALID_POINTER);
    788788    ComObjPtr<Console> pConsole = static_cast<Console *>(pvConsole);
    789789
     
    839839    Bstr            bstr;
    840840
    841 #define H()         AssertMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE)
     841#define H()         AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
    842842
    843843    /*
     
    22062206
    22072207                default:
    2208                     AssertMsgFailedReturn(("invalid storage controller type: %d\n", enmCtrlType), VERR_GENERAL_FAILURE);
     2208                    AssertLogRelMsgFailedReturn(("invalid storage controller type: %d\n", enmCtrlType), VERR_MAIN_CONFIG_CONSTRUCTOR_IPE);
    22092209            }
    22102210
     
    30683068    catch (HRESULT hrcXcpt)
    30693069    {
    3070         AssertMsgFailedReturn(("hrc=%Rhrc\n", hrcXcpt), VERR_GENERAL_FAILURE);
     3070        AssertLogRelMsgFailedReturn(("hrc=%Rhrc\n", hrcXcpt), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR);
    30713071    }
    30723072
     
    33753375        const char *pcszDevice = "vga";
    33763376
    3377 #define H()         AssertMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE)
     3377#define H()         AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
    33783378        InsertConfigNode(pDevices, pcszDevice, &pDev);
    33793379        InsertConfigNode(pDev,     "0", &pInst);
     
    35573557
    35583558// #define RC_CHECK()  AssertMsgReturn(RT_SUCCESS(rc), ("rc=%Rrc\n", rc), rc)
    3559 #define H()         AssertMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE)
     3559#define H()         AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
    35603560
    35613561        LONG lDev;
     
    43674367        Bstr bstr;
    43684368
    4369 #define H()         AssertMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE)
     4369#define H()         AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)
    43704370
    43714371        /*
     
    55085508{
    55095509#ifdef VBOX_WITH_GUEST_PROPS
    5510     AssertReturn(pvConsole, VERR_GENERAL_FAILURE);
     5510    AssertReturn(pvConsole, VERR_INVALID_POINTER);
    55115511    ComObjPtr<Console> pConsole = static_cast<Console *>(pvConsole);
    5512     AssertReturn(pConsole->m_pVMMDev, VERR_GENERAL_FAILURE);
     5512    AssertReturn(pConsole->m_pVMMDev, VERR_INVALID_POINTER);
    55135513
    55145514    /* Load the service */
     
    55615561                                                      ComSafeArrayAsOutParam(timestampsOut),
    55625562                                                      ComSafeArrayAsOutParam(flagsOut));
    5563         AssertMsgReturn(SUCCEEDED(hrc), ("hrc=%Rhrc\n", hrc), VERR_GENERAL_FAILURE);
     5563        AssertLogRelMsgReturn(SUCCEEDED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR);
    55645564        size_t cProps = namesOut.size();
    55655565        size_t cAlloc = cProps + 1;
     
    56655665{
    56665666#ifdef VBOX_WITH_GUEST_CONTROL
    5667     AssertReturn(pvConsole, VERR_GENERAL_FAILURE);
     5667    AssertReturn(pvConsole, VERR_INVALID_POINTER);
    56685668    ComObjPtr<Console> pConsole = static_cast<Console *>(pvConsole);
    56695669
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette