diff --git a/Assets/Scripts/ServerShared/AetheriaStores.cs b/Assets/Scripts/ServerShared/AetheriaStores.cs index e2cdcd631..92f8e3f90 100644 --- a/Assets/Scripts/ServerShared/AetheriaStores.cs +++ b/Assets/Scripts/ServerShared/AetheriaStores.cs @@ -18,7 +18,7 @@ public static class AetheriaStores { // A read-only open of an absent catalog would hydrate an empty game; a shipped player missing its catalog stops here. if (!catalogWritable && !File.Exists(catalogPath)) - throw new InvalidOperationException($"Catalog {catalogPath} does not exist; a read-only open never invents one."); + throw new FileNotFoundException($"Catalog {catalogPath} does not exist; a read-only open never invents one.", catalogPath); var cache = new CultCache(); try { diff --git a/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs b/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs index 099c3a259..4d7611b9a 100644 --- a/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs +++ b/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs @@ -209,7 +209,8 @@ public sealed class AetheriaStoresTests : IDisposable { var missing = Path.Combine(_root, "absent", "Aetheria.cc"); - var error = Assert.Throws(() => AetheriaStores.Open(missing)); + // FileNotFoundException, not the catalog-global check: that one also throws on a missing file whenever a global is registered. + var error = Assert.Throws(() => AetheriaStores.Open(missing)); Assert.Contains(missing, error.Message); Assert.False(File.Exists(missing)); Assert.False(Directory.Exists(Path.GetDirectoryName(missing)));