1. CRISTIAN MEDINA
  2. .NET DataStore
  3. Monday, 23 August 2021 16:43 PM UTC
put multiple updates of datastores in a try catch, if update fails in one or many uf the datastores no exception is fired, but if checked the update 
ifsreturning -1 but no option to get the update error : try{ lds1.update(true,PbResultStyle.Flags); lds2.update(true,PbResultStyle.Flags); } catch (Exception e) { as_err = "ERROR: " + e.ToString(); return -1; }
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 24 August 2021 05:15 AM UTC
  2. .NET DataStore
  3. # 1

Hi LUIS,

 

You can get the error message of the datastore update failure in the captured Exception’s message property. You just need to change the code:

e.ToString()

into

e.Message

 

Use your code as an example, it needs to be changed as follows:

try{

   lds1.update(true,PbResultStyle.Flags);

   lds2.update(true,PbResultStyle.Flags);

}

catch (Exception e)

{

     as_err = "ERROR: " + e.Message;

     return -1;

}

 

Regards,

David

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.