[Solved] Can not pass error via delegate [closed]


Do same null-check as you did when invoked action first time:

catch (Exception ex)
 { 
    if (onError != null)
        onError(ex); 
   return;    
 }

If you want to avoid null-checks – attach dummy handler to Action delegate at the top of your method:

onError += (e) => {};

2

solved Can not pass error via delegate [closed]