1
This commit is contained in:
@@ -39,14 +39,14 @@ namespace Tnb.WarehouseMgr.Entities.Exceptions
|
||||
|
||||
public static class TimedTaskExceptionExtensions
|
||||
{
|
||||
public static TimedTaskException ToTimedTaskException(this Exception exception, ErrorInfo exceptionInfo)
|
||||
public static TimedTaskException ToTimedTaskException(this Exception exception, TimedTaskErrorInfo exceptionInfo)
|
||||
{
|
||||
TimedTaskException ex = new(exception.Message, exceptionInfo.RequestURL, exceptionInfo.RequestMethod, exceptionInfo.userIdentity, exception);
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
|
||||
public class ErrorInfo
|
||||
public class TimedTaskErrorInfo
|
||||
{
|
||||
public string RequestURL { get; set; }
|
||||
public string RequestMethod { get; set; }
|
||||
|
||||
@@ -380,7 +380,7 @@ namespace Tnb.WarehouseMgr
|
||||
Log.Error("生成预任务执行时出现错误", ex);
|
||||
var opts = curUser.FindFirst(ClaimConst.CONNECTIONCONFIG)?.Value;
|
||||
|
||||
ErrorInfo ei = new()
|
||||
TimedTaskErrorInfo ei = new()
|
||||
{
|
||||
RequestURL = App.HttpContext?.Request?.Path,
|
||||
RequestMethod = App.HttpContext?.Request?.Method,
|
||||
|
||||
@@ -17,6 +17,7 @@ using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula;
|
||||
using SqlSugar;
|
||||
using TencentCloud.Common;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.Common.Utils;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
@@ -223,7 +224,12 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
JNPF.Logging.Log.Error("齐套分拣执行时出现错误", ex);
|
||||
await curDb.Ado.RollbackTranAsync();
|
||||
ErrorInfo ei = new()
|
||||
{
|
||||
|
||||
};
|
||||
cts?.Cancel();
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user