Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Dec 9, 2023
2 parents 8e981e9 + 1900b01 commit 71d1cfd
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Src/GbxToolAPI.CLI/ToolConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,19 +440,26 @@ private static async Task RunToolInstanceAsync(T toolInstance, Dictionary<Proper

var watch = Stopwatch.StartNew();

var output = produceMethod.Invoke(toolInstance, null);
try
{
var output = produceMethod.Invoke(toolInstance, null);

var name = output is null ? "[null]" : GetTypeName(output.GetType());
var name = output is null ? "[null]" : GetTypeName(output.GetType());

Console.WriteLine($"Produced {name}. ({watch.Elapsed.TotalMilliseconds}ms)");
Console.WriteLine($"Produced {name}. ({watch.Elapsed.TotalMilliseconds}ms)");

if (output is null)
if (output is null)
{
continue;
}

var outputSaver = new OutputSaver(output, outputDir);
outputSaver.Save();
}
catch (TargetInvocationException tie)
{
continue;
throw tie.InnerException ?? tie;
}

var outputSaver = new OutputSaver(output, outputDir);
outputSaver.Save();
}
}

Expand Down

0 comments on commit 71d1cfd

Please sign in to comment.