mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Improve exception message for invalid torrent files
This commit is contained in:
parent
4240048853
commit
78329b7b92
1 changed files with 3 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using MonoTorrent;
|
||||
using NLog;
|
||||
|
|
@ -22,10 +23,10 @@ protected override void ValidateDownloadData(byte[] fileData)
|
|||
{
|
||||
Torrent.Load(fileData);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Debug("Invalid torrent file contents: {0}", Encoding.ASCII.GetString(fileData));
|
||||
throw;
|
||||
throw new NotSupportedException($"Invalid torrent file contents. Reason: {ex.Message}", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue