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. |
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 next 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 that 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).
{E053D3C0-F493-491B-A735-3A9F0B1FEED4}
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.
readonly attribute wstringUUID IVirtualBoxErrorInfo::interfaceID |
UUID of the interface that defined the error.
readonly attribute wstring IVirtualBoxErrorInfo::component |
Name of the component that generated the error.
readonly attribute wstring IVirtualBoxErrorInfo::text |
Text description of the error.
readonly attribute IVirtualBoxErrorInfo IVirtualBoxErrorInfo::next |
Next error object if there is any, or null
otherwise.