XLL+ Class Library (7.0)

CXllApp::DisplayException

Called by wrapper functions to translate caught exceptions to error messages

virtual void DisplayException(
   CXlOper& xloResult,
   const CXlRuntimeException& ex
);

Parameters

xloResult

This value should be set to contain the result which will be displayed in Excel.

ex

A reference to the exception which was thrown and caught, and which is to be represented in xloResult.

Remarks

This method is called by wrapper functions when an exception of type CXlRuntimeException is thrown by an add-in function.

You can override it to change the standard exception-handling behavior of your add-in.

The default implementation of this function sets xloResult to contain the error message prefixed by "#ERROR: ", e.g.:

CopyC++
#ERROR: Expected number for Series[4]

See Overriding exception-handling behavior in the User Guide for more information.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | CXllApp::ConvertTypeToError | Overriding exception-handling behavior