mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
enhance: do not show error message if it is empty
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
7bfb95f7ce
commit
bdf439a742
1 changed files with 5 additions and 13 deletions
|
@ -31,10 +31,7 @@ namespace SourceGit.Commands
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
Dispatcher.UIThread.Invoke(() => App.RaiseException(repo, e.Message));
|
||||||
{
|
|
||||||
App.RaiseException(repo, e.Message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,19 +84,14 @@ namespace SourceGit.Commands
|
||||||
var exitCode = proc.ExitCode;
|
var exitCode = proc.ExitCode;
|
||||||
if (exitCode != 0)
|
if (exitCode != 0)
|
||||||
{
|
{
|
||||||
var errMsg = builder.ToString();
|
var errMsg = builder.ToString().Trim();
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
if (!string.IsNullOrEmpty(errMsg))
|
||||||
{
|
Dispatcher.UIThread.Invoke(() => App.RaiseException(repo, errMsg));
|
||||||
App.RaiseException(repo, errMsg);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
Dispatcher.UIThread.Invoke(() => App.RaiseException(repo, e.Message));
|
||||||
{
|
|
||||||
App.RaiseException(repo, e.Message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc.Close();
|
proc.Close();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue