Hello,
On Thu, August 21, 2008 13:40, a.p. wrote:
>
> Hello.
> I try to return an error message directly from any OPER* function. Usually,
> in any catch section (at the end of XLL_DEC function description) error
> message are logged by logError() function. So return value is 0, or #NUM in
> Excel cell. Is there any way to return an error message during function
> call, instead of usage retrieveError function (like in QLXL framework by
> "Display error" option)? I tried to create a local XLOPER variable in catch
> section, such as:
>
> catch (const std::exception &e) {
> XLOPER returnValue;
> const std::string str = e.what();
> ObjectHandler::scalarToOper(str, returnValue);
> return &returnValue;
> }
> but of course it doesn't work cause the returnValue variable is local.
> Thanks.
You just need to declare returnValue as a static variable.
Regards,
Eric
-------------------------
Eric Ehlers
nazcatech sprl | Brussels |
http://www.nazcatech.beDistributed computing for pricing analytics - Use Microsoft Excel as a client
to the Grid
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev