This commit is contained in:
辉鸭蛋
2025-07-09 00:19:02 +08:00
parent 98c8e6bb72
commit 314ea68806
2 changed files with 14 additions and 1 deletions

View File

@@ -220,6 +220,10 @@ public class PathExecutor
break;
}
catch (HandledException handledException)
{
break;
}
catch (NormalEndException normalEndException)
{
Logger.LogInformation(normalEndException.Message);
@@ -1282,7 +1286,7 @@ public class PathExecutor
{
if (EndAction != null && EndAction(ra))
{
throw new NormalEndException("达成结束条件,结束地图追踪");
throw new HandledException("达成结束条件,结束地图追踪");
}
}
}

View File

@@ -0,0 +1,9 @@
namespace BetterGenshinImpact.GameTask.AutoGeniusInvokation.Exception; // TODO: change this namespace to BetterGenshinImpact.GameTask.Common.Exception
/// <summary>
/// 无需再次抛出的异常类,通常用于在任务中捕获异常后处理完毕,不要再向上抛出异常。
/// </summary>
/// <param name="message"></param>
public class HandledException(string message) : System.Exception(message)
{
}