@@ -531,7 +531,11 @@ private static ProgressBarStyle ProgressFormStyle {
531531 return ;
532532 }
533533
534- taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
534+ try {
535+ taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
536+ } catch ( Exception ex ) {
537+ LogExceptionToLauncher ( ex ) ;
538+ }
535539 }
536540 }
537541
@@ -583,11 +587,19 @@ private static int ProgressFormValue {
583587 return ;
584588 }
585589
586- taskbarList . SetProgressValue ( ProgressForm . Handle , ProgressManager . progressFormValue , PROGRESS_FORM_VALUE_COMPLETE ) ;
590+ try {
591+ taskbarList . SetProgressValue ( ProgressForm . Handle , ProgressManager . progressFormValue , PROGRESS_FORM_VALUE_COMPLETE ) ;
592+ } catch ( Exception ex ) {
593+ LogExceptionToLauncher ( ex ) ;
594+ }
587595
588596 // it is required to enter no progress state when completed
589597 if ( completed ) {
590- taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
598+ try {
599+ taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
600+ } catch ( Exception ex ) {
601+ LogExceptionToLauncher ( ex ) ;
602+ }
591603 return ;
592604 }
593605
@@ -660,7 +672,11 @@ private static IntPtr ProgressFormState {
660672 return ;
661673 }
662674
663- taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
675+ try {
676+ taskbarList . SetProgressState ( ProgressForm . Handle , ProgressManager . progressFormState ) ;
677+ } catch ( Exception ex ) {
678+ LogExceptionToLauncher ( ex ) ;
679+ }
664680 }
665681 }
666682
0 commit comments