An exception which causes a specific error value to be returned to Excel.
class CXlErrorException : public CXlRuntimeException |
Throw an exception of type CXlErrorException to ensure that the desired error code will be returned to Excel.
The following code will return #VALUE!
to Excel if x is negative.
if (x < 0) throw CXlErrorException(xlerrValue);
Header: xlpexcept.h