mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-11 23:57:11 -07:00
Fixed: Improve logging for invalid NZB messages
This commit is contained in:
parent
586eed0c9d
commit
f814b5a6e1
2 changed files with 3 additions and 8 deletions
|
@ -20,10 +20,5 @@ namespace NzbDrone.Core.Download
|
|||
public InvalidNzbException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public InvalidNzbException(string message, string nzbName)
|
||||
: base($"{message} [{0}]", nzbName)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,12 +24,12 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (nzb == null)
|
||||
{
|
||||
throw new InvalidNzbException("No Root element", filename);
|
||||
throw new InvalidNzbException("Invalid NZB: No Root element [{0}]", filename);
|
||||
}
|
||||
|
||||
if (!nzb.Name.LocalName.Equals("nzb"))
|
||||
{
|
||||
throw new InvalidNzbException("Invalid root element", filename);
|
||||
throw new InvalidNzbException("Invalid NZB: Unexpected root element. Expected 'nzb' found '{0}' [{1}]", nzb.Name.LocalName, filename);
|
||||
}
|
||||
|
||||
var ns = nzb.Name.Namespace;
|
||||
|
@ -37,7 +37,7 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (files.Empty())
|
||||
{
|
||||
throw new InvalidNzbException("No files", filename);
|
||||
throw new InvalidNzbException("Invalid NZB: No files [{0}]", filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue