UI rework and fixes

This commit is contained in:
2023-04-12 17:13:43 -04:00
parent 242663c3e5
commit 68aec56824
12 changed files with 207 additions and 175 deletions

View File

@@ -0,0 +1,8 @@
namespace FeedCenter.FeedParsers
{
internal enum FeedParseError
{
Unknown = 0,
InvalidXml = 1
}
}

View File

@@ -0,0 +1,14 @@
using System;
namespace FeedCenter.FeedParsers
{
internal class FeedParseException : ApplicationException
{
public FeedParseException(FeedParseError feedParseError)
{
ParseError = feedParseError;
}
public FeedParseError ParseError { get; set; }
}
}

View File

@@ -142,11 +142,17 @@ namespace FeedCenter.FeedParsers
// No clue!
return FeedType.Unknown;
}
catch (XmlException xmlException)
{
Log.Logger.Error(xmlException, "Exception: {0}", feedText);
throw new FeedParseException(FeedParseError.InvalidXml);
}
catch (Exception exception)
{
Log.Logger.Error(exception, "Exception: {0}", feedText);
return FeedType.Unknown;
throw new FeedParseException(FeedParseError.InvalidXml);
}
}