VirtualBox

Changeset 79139 in vbox


Ignore:
Timestamp:
Jun 14, 2019 1:00:56 AM (6 years ago)
Author:
vboxsync
Message:

Main/vboxapi.py: Prefer S_OK and the E_XXXX style constants over the XPCOM ones in xcptToString().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/vboxapi.py

    r79092 r79139  
    12231223                    if type(oValue) is int:
    12241224                        dErrorValToName[oValue] = sKey
     1225            # Always prefer the COM names (see aliasing in platform specific code):
     1226            for sKey in ('S_OK', 'E_FAIL', 'E_ABORT', 'E_POINTER', 'E_NOINTERFACE', 'E_INVALIDARG',
     1227                         'E_OUTOFMEMORY', 'E_NOTIMPL', 'E_UNEXPECTED',):
     1228                oValue = getattr(self.statuses, sKey, None)
     1229                if oValue is not None:
     1230                    dErrorValToName[oValue] = sKey
    12251231            self._dErrorValToName = dErrorValToName
    12261232
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