private static CallWithErrorMessage ( IServiceProvider serviceProvider, System.Action action ) : void | ||
serviceProvider | IServiceProvider | service provider |
action | System.Action | action to invoke |
return | void |
private static void CallWithErrorMessage(IServiceProvider serviceProvider, Action action)
{
try
{
action();
}
catch (Exception ex)
{
if (Microsoft.VisualStudio.ErrorHandler.IsCriticalException(ex))
{
throw;
}
ShowErrorMessage(serviceProvider, ex);
}
}