Ejemplo n.º 1
0
        public static OperationError ToError(Exception exception)
        {
            exception.NotNull(nameof(exception));

            return(new OperationError
            {
                Code = exception.HResult.ToString(CultureInfo.InvariantCulture),
                Description = exception.AsInnerMessage(),
                Exception = exception
            });
        }
 public override void ExceptionCaught(IChannelHandlerContext context, Exception exception)
 {
     _logger.LogError(exception, exception.AsInnerMessage());
     context.CloseAsync();
 }