Skip to content

Commit

Permalink
Fixed issue where WTQ would crash if app cannot be started on WTQ start
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingpie committed Nov 6, 2024
1 parent 1e52788 commit 5d986c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/10-Core/Wtq/Services/WtqWindowResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ public sealed class WtqWindowResolver(
// Try to start a new process that presumably creates the window we're looking for.
_log.LogInformation("Got no process for options {Options}, attempting to create one", opts);

await _windowService.CreateAsync(opts).NoCtx();
try
{
await _windowService.CreateAsync(opts).NoCtx();
}
catch (Exception ex)
{
_log.LogError(ex, "Could not create process for app '{App}': {Message}", opts, ex.Message);
return null;
}

for (var attempt = 0; attempt < 5; attempt++)
{
Expand Down

0 comments on commit 5d986c0

Please sign in to comment.