Skip to content

Commit

Permalink
Handle exception
Browse files Browse the repository at this point in the history
  • Loading branch information
C1rdec committed Dec 14, 2024
1 parent fcbd1cb commit 46872b8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/PoeLurker.Core/KeyboardLurker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class KeyboardLurker
{
#region Fields

private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();

private readonly Robot _robot;
private CancellationTokenSource _tokenSource;
private readonly KeyboardHook _keyboardHook;
Expand Down Expand Up @@ -347,8 +349,14 @@ private async void OpenPoeTrade(KeyboardMessageEventArgs e)
{
return;
}

PoeTradeService.Open(itemText);
try
{
PoeTradeService.Open(itemText);
}
catch (Exception ex)
{
Logger.Error(ex, ex.Message);
}
}

/// <summary>
Expand Down

0 comments on commit 46872b8

Please sign in to comment.