Store readability: one typed refusal, one full reader, one store shape
CultStoreUnreadableException (a NotSupportedException) is the one refusal for a store file this runtime cannot read, thrown by the single-file reader, the rewriting paths and CultMesh's reads, with the cause as the inner exception. The reader is exactly one array of three slots (or an empty array): a header alone and an extra top-level slot are refused instead of read as empty or skipped. CultMesh's older-catalog fallback is the same reader with the older entry reader, so it also requires one array. Vectors: bad-body, header-only, missing-schema, variant-slot, extra-top-slot in the readability set, and a legacy-catalog store with and without bytes after it for CultMesh. The persistence contract says what is true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e18624f72b
commit
436eed73e4
23 changed files with 186 additions and 84 deletions
18
src/GameCult.Caching/CultStoreUnreadableException.cs
Normal file
18
src/GameCult.Caching/CultStoreUnreadableException.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
|
||||
namespace GameCult.Caching
|
||||
{
|
||||
/// <summary>
|
||||
/// A store file this runtime cannot read: not exactly one complete store (truncated, bytes after it, a value that is not a
|
||||
/// store, a missing or extra top-level slot), a format or record it does not know, or a body it cannot decode. Open, flush,
|
||||
/// commit and CultMesh's single-file reads all refuse a file with this one exception, and a refused file is left as it was.
|
||||
/// The underlying cause, where there is one, is the inner exception.
|
||||
/// </summary>
|
||||
public sealed class CultStoreUnreadableException : NotSupportedException
|
||||
{
|
||||
public CultStoreUnreadableException(string message, Exception? innerException = null)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue