0

I am using Apache Ignite 2.7.5.

I don't know whether is there any way is there or not but trying to handle .net thin client exception,but i am not approaching to correct way,how to catch ignite java one throwable exception in c# .net catch block.

code:

public async void loadData(string configPath,List<JObject> dataList)
{
    using (var ldr = _ignite.GetDataStreamer<string, Employee>(cacheName))
    {
        try
        {
            await ldr.AddData(base64EncodedKey, emp);//from this line i am getting exception on console but not able to catch
        }
        catch (Exception ex)//how to catch here java one throw exception
        {           
        }               
    }

}

Any one suggest me correct approach to get exception in catch block.

cj devin
  • 1,045
  • 3
  • 13
  • 48
  • Does the `catch` catches the exception? If so, the exception has a type, you can use it to catch it. – Stefan Jun 28 '19 at 14:37
  • 2
    You may want to take a look a this answer to a similarly close issue https://stackoverflow.com/a/19865737/5916272 And this link explains clearly in figure2 why that catch won't catch errors with some async contexts https://msdn.microsoft.com/en-us/magazine/jj991977.aspx – YouneS Jun 28 '19 at 15:31

0 Answers0