Rev. | 86e26ecde9d36b0074e6fb8a2a2b26250bb81d51 |
---|---|
Größe | 1,211 Bytes |
Zeit | 2022-11-30 01:06:13 |
Autor | yoshy |
Log Message | [MOD] UserDialogProxy の名前空間を UI 配下から UI.Dialog 配下に移動
|
using CleanAuLait48.Adaptor.Boundary.Controller;
using CleanAuLait48.Adaptor.Boundary.Controller.Handler;
using CleanAuLait48.Adaptor.Boundary.Gateway.UI.Dialog;
using CleanAuLait48.UseCase.Request;
using CleanAuLait48.UseCase.Response;
using NLog;
using System;
using System.Threading.Tasks;
namespace CleanAuLait48.Adaptor.Controller.Handler
{
public class AsyncSimpleUserDialogErrorHandler : AbstractErrorHandler, IAsyncRequestHandler
{
private static readonly ILogger logger = LogManager.GetCurrentClassLogger();
public AsyncSimpleUserDialogErrorHandler(IUserDialogProxy dialog) : base(dialog)
{
}
public async Task<UseCaseResponse> HandleAsync(UseCaseRequest req, IAsyncHandlerContext context)
{
UseCaseResponse res;
try
{
res = await context.HandleNextAsync(req, context);
}
catch (Exception e)
{
logger.Error(e);
res = UseCaseResponse.AbortWithSomeErrors<UseCaseResponse>(
$"Handling Async UseCase failed. {e.Message}");
}
return HandleResponse(req, res);
}
}
}