The IMMErrorInfo class represents error information that you can include in an exception object. When an multimedia call results in an error condition, objects of the IMMErrorInfo class are created. You can use the error text to construct a derived class object of IException.
The Open Class Library provides the following macros for throwing exceptions constructed with IMMErrorInfo information.
This macro generates code that calls throwMMError, which does the following:
Constructors & DestructorYou can construct and destruct objects of this class. You cannot create copies of objects of this class.
![]() |
public:
virtual ~IMMErrorInfo()
| Windows | OS/2 | AIX |
| Yes | Yes | No |
![]() |
public:
IMMErrorInfo( unsigned long errorId = 0, const char* functionName = 0 )
There is only one way to construct instances of this class. If the error number and the name of the failing API is passed in, it will be prefixed to the error text. If the error text cannot be loaded, the following default text is provided: "No error text is available."
| Windows | OS/2 | AIX |
| Yes | Yes | No |
Error InformationUse these members to query the accessible attributes of this class.
![]() |
public:
virtual unsigned long errorId() const
Returns the error ID.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
![]() |
public:
virtual bool isAvailable() const
If there is error text available for the error, returns true.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
![]() |
public:
virtual operator const char *() const
Returns the error text.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
![]() |
public:
virtual const char* text() const
Returns the error text.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
Throw SupportUse these members to support throwing of exceptions. The ITHROWMMERROR macro uses these members.
![]() |
public:
static void throwMMError( unsigned long errorId, const char* functionName, const IExceptionLocation& location, IBaseErrorInfo::ExceptionType name = accessError, IException::Severity severity = recoverable )
Creates an IMMErrorInfo object and uses the text from it to do the following:
| Windows | OS/2 | AIX |
| Yes | Yes | No |
virtual ~IBaseErrorInfo()
virtual unsigned long errorId() const = 0
IBaseErrorInfo()
virtual bool isAvailable() const = 0
virtual operator const char *() const = 0
virtual const char* text() const = 0
void throwError( const IExceptionLocation& location, ExceptionType name = accessError, IException::Severity severity = IException::recoverable, IException::ErrorCodeGroup errorGroup = IException::baseLibrary )