From a67bf12a42eb58390a0a51bc2d70bed835404b35 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 10 Oct 2022 15:56:56 -0500 Subject: don't throw FileNotFoundException --- src/slskd/Transfers/Uploads/UploadQueue.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/slskd/Transfers/Uploads/UploadQueue.cs b/src/slskd/Transfers/Uploads/UploadQueue.cs index 2c7e3eac..53e135e8 100644 --- a/src/slskd/Transfers/Uploads/UploadQueue.cs +++ b/src/slskd/Transfers/Uploads/UploadQueue.cs @@ -69,7 +69,7 @@ namespace slskd.Transfers /// The username associated with the file. /// The filename of the file for which the position is to be estimated. /// The estimated queue position of the file. - /// Thrown if the specified filename is not enqueued. + /// Thrown if the specified filename is not enqueued. int EstimatePosition(string username, string filename); /// @@ -251,7 +251,7 @@ namespace slskd.Transfers /// The username associated with the file. /// The filename of the file for which the position is to be estimated. /// The estimated queue position of the file. - /// Thrown if the specified filename is not enqueued. + /// Thrown if the specified filename is not enqueued. public int EstimatePosition(string username, string filename) { var groupName = Users.GetGroup(username); @@ -269,7 +269,7 @@ namespace slskd.Transfers // find this user's uploads if (!Uploads.TryGetValue(username, out var uploadsForUser)) { - throw new FileNotFoundException($"File {filename} is not enqueued for user {username}"); + throw new NotFoundException($"File {filename} is not enqueued for user {username}"); } // find the position of the requested file in the user's queue @@ -280,7 +280,7 @@ namespace slskd.Transfers if (localPosition < 0) { - throw new FileNotFoundException($"File {filename} is not enqueued for user {username}"); + throw new NotFoundException($"File {filename} is not enqueued for user {username}"); } // start the position to the local position within this user's queue; the user's own files must be completed @@ -321,7 +321,7 @@ namespace slskd.Transfers if (globalPosition < 0) { - throw new FileNotFoundException($"File {filename} is not enqueued for user {username}"); + throw new NotFoundException($"File {filename} is not enqueued for user {username}"); } return globalPosition; -- cgit v1.2.3