浏览代码

Better exception message when folders or folder items are missing (#13632)

Emit the not-found Id in the exception for easier diagnosis
Marc Brooks 3 月之前
父节点
当前提交
f035b11625
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Emby.Server.Implementations/Collections/CollectionManager.cs

+ 2 - 2
Emby.Server.Implementations/Collections/CollectionManager.cs

@@ -204,7 +204,7 @@ namespace Emby.Server.Implementations.Collections
         {
             if (_libraryManager.GetItemById(collectionId) is not BoxSet collection)
             {
-                throw new ArgumentException("No collection exists with the supplied Id");
+                throw new ArgumentException("No collection exists with the supplied collectionId " + collectionId);
             }
 
             List<BaseItem>? itemList = null;
@@ -218,7 +218,7 @@ namespace Emby.Server.Implementations.Collections
 
                 if (item is null)
                 {
-                    throw new ArgumentException("No item exists with the supplied Id");
+                    throw new ArgumentException("No item exists with the supplied Id " + id);
                 }
 
                 if (!currentLinkedChildrenIds.Contains(id))