Convert NullReferenceException to ResourceNotFoundException

This commit is contained in:
crobibero
2020-11-13 11:14:44 -07:00
parent be312f992d
commit 5f52a58e78
18 changed files with 40 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ using System.Linq;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Net;
@@ -59,7 +60,7 @@ namespace Emby.Server.Implementations.Session
{
if (sender == null)
{
throw new NullReferenceException(nameof(sender));
throw new ResourceNotFoundException(nameof(sender));
}
var connection = (IWebSocketConnection)sender;