VirtualBox

Changeset 43664 in vbox


Ignore:
Timestamp:
Oct 17, 2012 10:16:02 AM (12 years ago)
Author:
vboxsync
Message:

VBoxManage snapshot: just a small error message if 'snapshot list' does not find any snapshots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp

    r39120 r43664  
    190190    /* See showVMInfo. */
    191191    ComPtr<ISnapshot> ptrSnapshot;
    192     CHECK_ERROR2_RET(rptrMachine, FindSnapshot(Bstr().raw(), ptrSnapshot.asOutParam()), RTEXITCODE_FAILURE);
     192    HRESULT hrc = rptrMachine->FindSnapshot(Bstr().raw(), ptrSnapshot.asOutParam());
     193    if (FAILED(hrc))
     194    {
     195        RTPrintf("This machine does not have any snapshots\n");
     196        return RTEXITCODE_FAILURE;
     197    }
    193198    if (ptrSnapshot)
    194199    {
    195200        ComPtr<ISnapshot> ptrCurrentSnapshot;
    196201        CHECK_ERROR2_RET(rptrMachine,COMGETTER(CurrentSnapshot)(ptrCurrentSnapshot.asOutParam()), RTEXITCODE_FAILURE);
    197         HRESULT hrc = showSnapshots(ptrSnapshot, ptrCurrentSnapshot, enmDetails);
     202        hrc = showSnapshots(ptrSnapshot, ptrCurrentSnapshot, enmDetails);
    198203        if (FAILED(hrc))
    199204            return RTEXITCODE_FAILURE;
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