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

@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Model.Cryptography;
using static MediaBrowser.Common.Cryptography.Constants;
@@ -83,7 +84,7 @@ namespace Emby.Server.Implementations.Cryptography
using var h = HashAlgorithm.Create(hashMethod);
if (h == null)
{
throw new NullReferenceException(nameof(h));
throw new ResourceNotFoundException(nameof(h));
}
if (salt.Length == 0)