Declares a translation between an exception type and an Excel error value
XLEXCEPTION_TRANSLATION( LABEL exceptionType, XlErrorType xlerr ); |
The type of exception to be translated, e.g. CXlConversionException
.
Note that the class name is not in quotes - it is a label, not a string.
An Excel error value to be returned to Excel. See Error value types for a full list of error codes.
This macro creates a XlExceptionTranslation
structure,
which can be used by CXllApp::ConvertTypeToError
to translate an exception to an Excel error value.
If you use the XLEXCEPTION_TRANSLATION macro, you should ensure that your project
has the Enable Run-time Type Info setting set to Yes (/GR)
.
The setting can be found on the C/C++ - Language page of the project settings.
See Overriding exception-handling behavior in the User Guide for more information about this method.
Header: xlpexcept.h
Exception macros | XLEXCEPTION_TRANSLATION_END | CXllApp::ConvertTypeToError