From a713e450fe497abe69a16c671b7bc721a010984b Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Thu, 24 Nov 2022 15:57:07 +0100 Subject: [PATCH] move invalid entry exception --- EDPlayerJournal/Entries/Entry.cs | 5 ----- EDPlayerJournal/JournalException.cs | 19 ++++++++++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/EDPlayerJournal/Entries/Entry.cs b/EDPlayerJournal/Entries/Entry.cs index e3c1c42..a7367b4 100644 --- a/EDPlayerJournal/Entries/Entry.cs +++ b/EDPlayerJournal/Entries/Entry.cs @@ -4,11 +4,6 @@ using System.Runtime.InteropServices; namespace EDPlayerJournal.Entries; -public class InvalidJournalEntryException : Exception { - public InvalidJournalEntryException() { } - public InvalidJournalEntryException(string message) : base(message) { } -} - /// /// Base class for a single entry within the player journal. If no specific sub class is available /// this class gives basic information, such as EventType or date when it happened. It also allows diff --git a/EDPlayerJournal/JournalException.cs b/EDPlayerJournal/JournalException.cs index fe7290f..47e3d76 100644 --- a/EDPlayerJournal/JournalException.cs +++ b/EDPlayerJournal/JournalException.cs @@ -1,7 +1,16 @@ -using System; +namespace EDPlayerJournal; -namespace EDPlayerJournal; -public class JournalException : Exception { - public JournalException(string message) : base(message) { - } +/// +/// Thrown when the parser encounters an invalid journal entry +/// +public class InvalidJournalEntryException : Exception { + public InvalidJournalEntryException() { } + public InvalidJournalEntryException(string message) : base(message) { } +} + +/// +/// Thrown when the parser finds an invalid journal file +/// +public class JournalException : Exception { + public JournalException(string message) : base(message) {} }