VirtualBox Main API
Public Attributes | List of all members
IVirtualBoxErrorInfo Interface Reference

The IVirtualBoxErrorInfo interface represents extended error information. More...

Public Attributes

readonly attribute long resultCode
 Result code of the error.
readonly attribute wstringUUID interfaceID
 UUID of the interface that defined the error.
readonly attribute wstring component
 Name of the component that generated the error.
readonly attribute wstring text
 Text description of the error.
readonly attribute
IVirtualBoxErrorInfo 
next
 Next error object if there is any, or null otherwise.

Detailed Description

The IVirtualBoxErrorInfo interface represents extended error information.

  Extended error information can be set by VirtualBox components after
  unsuccessful or partially successful method invocation. This information
  can be retrieved by the calling party as an IVirtualBoxErrorInfo object
  and then shown to the client in addition to the plain 32-bit result code.

  In MS COM, this interface extends the IErrorInfo interface,
  in XPCOM, it extends the nsIException interface. In both cases,
  it provides a set of common attributes to retrieve error
  information.

  Sometimes invocation of some component's method may involve methods of
  other components that may also fail (independently of this method's
  failure), or a series of non-fatal errors may precede a fatal error that
  causes method failure. In cases like that, it may be desirable to preserve
  information about all errors happened during method invocation and deliver
  it to the caller. The @link #next next@endlink<b></b> attribute is intended
  specifically for this purpose and allows to represent a chain of errors
  through a single IVirtualBoxErrorInfo object set after method invocation.
Note
errors are stored to a chain in the reverse order, i.e. the initial error object you query right after method invocation is the last error set by the callee, the object it points to in the next attribute is the previous error and so on, up to the first error (which is the last in the chain).
Interface ID:
{E053D3C0-F493-491B-A735-3A9F0B1FEED4}

Member Data Documentation

readonly attribute long IVirtualBoxErrorInfo::resultCode

Result code of the error.

    Usually, it will be the same as the result code returned
    by the method that provided this error information, but not
    always. For example, on Win32, CoCreateInstance() will most
    likely return E_NOINTERFACE upon unsuccessful component
    instantiation attempt, but not the value the component factory
    returned. Value is typed 'long', not 'result',
    to make interface usable from scripting languages.
Note
In MS COM, there is no equivalent. In XPCOM, it is the same as nsIException::result.
readonly attribute wstringUUID IVirtualBoxErrorInfo::interfaceID

UUID of the interface that defined the error.

Note
In MS COM, it is the same as IErrorInfo::GetGUID, except for the data type. In XPCOM, there is no equivalent.
readonly attribute wstring IVirtualBoxErrorInfo::component

Name of the component that generated the error.

Note
In MS COM, it is the same as IErrorInfo::GetSource. In XPCOM, there is no equivalent.
readonly attribute wstring IVirtualBoxErrorInfo::text

Text description of the error.

Note
In MS COM, it is the same as IErrorInfo::GetDescription. In XPCOM, it is the same as nsIException::message.
readonly attribute IVirtualBoxErrorInfo IVirtualBoxErrorInfo::next

Next error object if there is any, or null otherwise.

Note
In MS COM, there is no equivalent. In XPCOM, it is the same as nsIException::inner.