Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add a try catch on the Invoke method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 13, 2023
1 parent 2e2017e commit 351df60
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations;
using Dalamud.Logging;

namespace RotationSolver.Basic.Rotations;

public abstract partial class CustomRotation
{
Expand Down Expand Up @@ -61,7 +63,14 @@ public bool TryInvoke(out IAction newAction, out IAction gcdAction)
AntiKnockbackAbility = AntiKnockback(role, SpecialCommandType.AntiKnockback, out act) ? act : null;
UpdateInfo();

newAction = Invoke(out gcdAction);
try
{
newAction = Invoke(out gcdAction);
}
catch(Exception ex)
{
PluginLog.Error(ex, "Failed to invoke the next action");
}

return newAction != null;
}
Expand Down

0 comments on commit 351df60

Please sign in to comment.