diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-26 12:48:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-26 12:48:24 -0500 |
| commit | 6a89ec6556b47f46b6a87240a82bc872fed5a972 (patch) | |
| tree | 3485585ebd551109e7dbfb61a587f7cf6c0b72e3 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | a8381586237a3294476c55b3af63cb7c162adfea (diff) | |
| parent | 325066f7edb52481e93be3b3d90db45645d6924b (diff) | |
Merge pull request #2366 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 0e1f5a551..83885ee2e 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -228,11 +228,14 @@ namespace Emby.Server.Implementations.HttpServer } } - private void ErrorHandler(Exception ex, IRequest httpReq) + private void ErrorHandler(Exception ex, IRequest httpReq, bool logException = true) { try { - _logger.ErrorException("Error processing request", ex); + if (logException) + { + _logger.ErrorException("Error processing request", ex); + } var httpRes = httpReq.Response; @@ -529,6 +532,10 @@ namespace Emby.Server.Implementations.HttpServer ErrorHandler(new FileNotFoundException(), httpReq); } } + catch (OperationCanceledException ex) + { + ErrorHandler(ex, httpReq, false); + } catch (Exception ex) { ErrorHandler(ex, httpReq); |
