XLL+ Class Library (6.3)

::XLEXCEPTION_TRANSLATION

Declares a translation between an exception type and an Excel error value

XLEXCEPTION_TRANSLATION(
   LABEL exceptionType,
   XlErrorType xlerr
);

Parameters

exceptionType

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.

xlerr

An Excel error value to be returned to Excel. See Error value types for a full list of error codes.

Remarks

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.

Requirements

Header: xlpexcept.h

See Also

Exception macros | XLEXCEPTION_TRANSLATION_END | CXllApp::ConvertTypeToError