Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Internal.Common;
using Microsoft.Internal.Common.Utils;

namespace Microsoft.Diagnostics.Tools.Trace
{
Expand All @@ -21,12 +22,12 @@ public static int ConvertFile(TextWriter stdOut, TextWriter stdError, FileInfo i
if (!Enum.IsDefined(format))
{
stdError.WriteLine($"Please specify a valid option for the --format. Valid options are: {string.Join(", ", Enum.GetNames<TraceFileFormat>())}.");
return ErrorCodes.ArgumentError;
return (int)ReturnCode.ArgumentError;
}

if (!ValidateNetTraceHeader(stdError, inputFilename.FullName))
{
return ErrorCodes.ArgumentError;
return (int)ReturnCode.ArgumentError;
}

string outputFilename = TraceFileFormatConverter.GetConvertedFilename(inputFilename.FullName, output?.FullName, format);
Expand Down Expand Up @@ -83,7 +84,7 @@ static int CopyNetTrace(TextWriter stdOut, TextWriter stdError, string inputfile
catch (Exception ex)
{
stdError.WriteLine($"Error copying nettrace to {outputfile}: {ex.Message}");
return ErrorCodes.UnknownError;
return (int)ReturnCode.UnknownError;
}

return 0;
Expand Down
13 changes: 0 additions & 13 deletions src/Tools/dotnet-trace/CommandLine/Commands/ErrorCode.cs

This file was deleted.