Skip to content

Commit 428034d

Browse files
improve output (#517)
1 parent 4e02ab0 commit 428034d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/coverlet.console/Program.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.Diagnostics;
45
using System.IO;
56
using System.Text;
6-
using System.Threading.Tasks;
7+
78
using ConsoleTables;
89
using Coverlet.Console.Logging;
910
using Coverlet.Core;
@@ -240,6 +241,11 @@ static int Main(string[] args)
240241
app.ShowHelp();
241242
return (int)CommandExitCodes.CommandParsingException;
242243
}
244+
catch (Win32Exception we) when (we.Source == "System.Diagnostics.Process")
245+
{
246+
logger.LogError($"Start process '{target.Value()}' failed with '{we.Message}'");
247+
return exitCode > 0 ? exitCode : (int)CommandExitCodes.Exception;
248+
}
243249
catch (Exception ex)
244250
{
245251
logger.LogError(ex.Message);

0 commit comments

Comments
 (0)