public Respuesta SetException(Exception Excepcion, ILogAPI _logger, Type TypeClass) { try { string erro = ""; if (Excepcion.InnerException != null) { erro = Excepcion.Message.ToString() + " InnerException " + (Excepcion.InnerException.InnerException == null ? Excepcion.InnerException.Message : Excepcion.InnerException.InnerException.Message); } else { erro = Excepcion.Message.ToString(); } _logger.Error(Excepcion.StackTrace.ToString() + " " + erro, TypeClass); _Objresponse.statusCode = "001"; _Objresponse.statusDesc = erro; return(_Objresponse); } catch (Exception ex) { throw ex; } }
public GlobalExceptionHandlerMiddleware(ILogAPI log) { _log = log; }
public TestController(ILogAPI log) { _log = log; }