Skip to content
Merged
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 @@ -20,7 +20,6 @@ public override async Task InvokeAsync(ConsoleAppContext context, Cancel cancell
logger.LogInformation("Received CTRL+C cancelling");
_cancelKeyPressed = true;
};
var error = false;
try
{
await Next.InvokeAsync(context, cancellationToken);
Expand All @@ -32,14 +31,10 @@ public override async Task InvokeAsync(ConsoleAppContext context, Cancel cancell
logger.LogInformation("Cancellation requested, exiting.");
return;
}
error = true;
_ = collector.StartAsync(cancellationToken);
collector.EmitGlobalError($"Global unhandled exception: {ex.Message}", ex);
await collector.StopAsync(cancellationToken);
}
finally
{
Environment.ExitCode = error ? 1 : 0;
Environment.ExitCode = 1;
}
}
}
Loading