You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticclassExceptionsWithData{/// <summary>/// Add <paramref name="data"/> to the Data member of <paramref name="e"/> before returning the modified exception./// </summary>/// <remarks>/// <para>This method should be used to add context (beyond the message and callstack we normally get) to the exception/// that would be useful when debugging Watson crashes.</para>/// <para>Do not use this method when you expect the exception to be handled.</para>/// </remarks>publicstatic T AddData<T>(thisTe,paramsobject[] data)whereT:Exception{if(data.Length >0){
e.Data.Add("AddData", data);}returne;}/// <summary>/// Modify <paramref name="e"/> by performing <paramref name="action"/> on it before returning the modified exception./// </summary>/// <remarks>/// <para>This method should be used to add context (beyond the message and callstack we normally get) to the exception/// that would be useful when debugging Watson crashes.</para>/// <para>Do not use this method when you expect the exception to be handled.</para>/// </remarks>publicstatic T Modify<T>(thisTe,Action<T>action)whereT:Exception{if(action!=null){
action(e);}returne;}}
The text was updated successfully, but these errors were encountered:
The actual code is below, which could be used as follows.
The text was updated successfully, but these errors were encountered: