File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,8 @@ public bool Exec()
104
104
catch ( Exception e )
105
105
{
106
106
if ( RaiseError )
107
- {
108
- Dispatcher . UIThread . Invoke ( ( ) =>
109
- {
110
- App . RaiseException ( Context , e . Message ) ;
111
- } ) ;
112
- }
107
+ Dispatcher . UIThread . Post ( ( ) => App . RaiseException ( Context , e . Message ) ) ;
108
+
113
109
return false ;
114
110
}
115
111
@@ -120,15 +116,15 @@ public bool Exec()
120
116
int exitCode = proc . ExitCode ;
121
117
proc . Close ( ) ;
122
118
123
- if ( ! isCancelled && exitCode != 0 && errs . Count > 0 )
119
+ if ( ! isCancelled && exitCode != 0 )
124
120
{
125
121
if ( RaiseError )
126
122
{
127
- Dispatcher . UIThread . Invoke ( ( ) =>
128
- {
129
- App . RaiseException ( Context , string . Join ( "\n " , errs ) ) ;
130
- } ) ;
123
+ var errMsg = string . Join ( "\n " , errs ) ;
124
+ if ( ! string . IsNullOrWhiteSpace ( errMsg ) )
125
+ Dispatcher . UIThread . Post ( ( ) => App . RaiseException ( Context , errMsg ) ) ;
131
126
}
127
+
132
128
return false ;
133
129
}
134
130
You can’t perform that action at this time.
0 commit comments