From 63764cb669277fa79b097885657b85f3ff548035 Mon Sep 17 00:00:00 2001 From: goat Date: Wed, 27 Sep 2023 22:41:25 +0200 Subject: [PATCH] chore: move exception to separate file --- Dalamud/ServiceManager.cs | 2 +- Dalamud/Storage/FileReadException.cs | 16 ++++++++++++++++ Dalamud/Storage/ReliableFileStorage.cs | 8 -------- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 Dalamud/Storage/FileReadException.cs diff --git a/Dalamud/ServiceManager.cs b/Dalamud/ServiceManager.cs index 38dc7534f..f2ff864c3 100644 --- a/Dalamud/ServiceManager.cs +++ b/Dalamud/ServiceManager.cs @@ -84,7 +84,7 @@ internal static class ServiceManager /// /// Instance of . /// Instance of . - /// Instance of + /// Instance of . /// Instance of . public static void InitializeProvidedServicesAndClientStructs(Dalamud dalamud, DalamudStartInfo startInfo, ReliableFileStorage fs, DalamudConfiguration configuration) { diff --git a/Dalamud/Storage/FileReadException.cs b/Dalamud/Storage/FileReadException.cs new file mode 100644 index 000000000..09f7ff4fb --- /dev/null +++ b/Dalamud/Storage/FileReadException.cs @@ -0,0 +1,16 @@ +namespace Dalamud.Storage; + +/// +/// Thrown if all read operations fail. +/// +public class FileReadException : Exception +{ + /// + /// Initializes a new instance of the class. + /// + /// Inner error that caused this exception. + internal FileReadException(Exception inner) + : base("Failed to read file", inner) + { + } +} diff --git a/Dalamud/Storage/ReliableFileStorage.cs b/Dalamud/Storage/ReliableFileStorage.cs index 32fba9aef..43a32bf29 100644 --- a/Dalamud/Storage/ReliableFileStorage.cs +++ b/Dalamud/Storage/ReliableFileStorage.cs @@ -280,11 +280,3 @@ public class ReliableFileStorage : IServiceType, IDisposable public byte[] Data { get; set; } = null!; } } - -public class FileReadException : Exception -{ - public FileReadException(Exception inner) - : base("Failed to read file", inner) - { - } -}