I am developing a .NET Core 6 application.
In one part of the code I have this:
catch (Exception ex)
{
_logger.LogError(ex.GetMessage());
string error = "Por favor, contáctese con soporte técnico.";
if (ex.InnerException != null)
error = string.Concat("\n\n", ex.InnerException.Message);
return Json($"ERROR: Existió un error al iniciar sesión. {error}");
}
when I pass the mouse over ex
in ex.GetMessage()
, this warning appears:
that means "ex is not NULL here". What is that? How can I deal with this?