Don't swallow too many exceptions
- Swallowing too many exceptions can end up hiding issues in Kestrel itself. It's better to let the process die. - If we want to handle certain exceptions we should be as specific as possible with our try/catch blocks.
This commit is contained in:
parent
2e225b0db6
commit
f14af1f409
|
|
@ -93,6 +93,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
|||
catch (Exception ex)
|
||||
{
|
||||
Log.LogError("Connection._frame.Consume ", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ namespace Microsoft.AspNet.Server.Kestrel
|
|||
else
|
||||
{
|
||||
_log.LogError("KestrelThread.DoPostWork", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -299,6 +300,7 @@ namespace Microsoft.AspNet.Server.Kestrel
|
|||
catch (Exception ex)
|
||||
{
|
||||
_log.LogError("KestrelThread.DoPostCloseHandle", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
|||
catch (Exception ex)
|
||||
{
|
||||
req._log.LogError("UvConnectRequest", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
|||
catch (Exception ex)
|
||||
{
|
||||
stream._log.LogError("UvConnectionCb", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,6 +173,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
|||
catch (Exception ex)
|
||||
{
|
||||
stream._log.LogError("UbReadCb", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
|
|||
catch (Exception ex)
|
||||
{
|
||||
req._log.LogError("UvWriteCb", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue