Custom error enum in RTD

Add-in Express™ Support Service
That's what is more important than anything else

Custom error enum in RTD
 
Kiru Marimuthu


Guest


Hi

I have Rtd server wrapped in Udf exactly as said this series of articles https://www.add-in-express.com/creating-addins-blog/2011/01/12/excel-real-time-date-server/.

I would like to return my own errors from Rtd server back to Udf. I can see errors like ErrDiv0, ErrNA, ErrName available to use.
But I need something of my own enum of errors like this.


    public enum RtdError
    {

        AuthenticationFailed,
        ApiInvalidRequest,
        ServerError,
        UnknownError,
        NullValue,
        ErrorValue
    }



But they return their enum value, for eg: if I send APiInvalidRequest I get the value 1 in the Udf.
Please suggest the best way to pass my error enums from Rtd to Udf.

Thanks
Kiru
Posted 08 Feb, 2018 10:20:28 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Kiru,

In your scenario, an RTD server may return an object that the UDF would interpret and convert to a value that Excel is able to display, e.g. this string: "Authentication failed".


Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2018 04:44:02 Top