Skip to content

Commit

Permalink
fix: Report more detailed exception on parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 5, 2024
1 parent 70fc83b commit daaee68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NvGet.Tools.Shared/Arguments/ConsoleArgError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public ConsoleArgError(string argument, ConsoleArgErrorType type, Exception e =
public string Message => Type switch
{
ConsoleArgErrorType.UnrecognizedArgument => "unrecognized argument: " + Argument,
ConsoleArgErrorType.ValueAssignmentError => "error while trying to assign value: " + Argument,
ConsoleArgErrorType.ValueParsingError => "error while trying to parse value: " + Argument,
ConsoleArgErrorType.ValueAssignmentError => $"error while trying to assign value: {Argument} (Exception: {Exception?.Message ?? "None"})",
ConsoleArgErrorType.ValueParsingError => $"error while trying to parse value: {Argument} (Exception: {Exception?.Message ?? "None"})",

_ => $"{Type}: " + Argument,
};
Expand Down

0 comments on commit daaee68

Please sign in to comment.