MagicalBox.cs:78 throws if you have a null value in an interpolated string variable:
public bool TryReadTo(Type type, int offset, int alignment, string? format, ref Utf8StringWriter<IBufferWriter<byte>> handler)
{
if (offset < 0) return false;
if (type.IsEnum) goto USE_READER;
If you instead this is changed to:
public bool TryReadTo(Type? type, int offset, int alignment, string? format, ref Utf8StringWriter<IBufferWriter<byte>> handler)
{
if (offset < 0) return false;
if (type == null) return false;
if (type.IsEnum) goto USE_READER;
this it handles it correctly without any further changes. The exception thrown by it causes very hard to track down errors in the log file and the InternalErrorLogger just shows:
[Warning] [2026-03-06 14:09:42.400] [15] - Internal Logging exception: Object reference not set to an instance of an object. : at ZLogger.Internal.MagicalBox.TryReadTo(Type type, Int32 offset, Int32 alignment, String format, Utf8StringWriter1& handler)
at ZLogger.MessageSequence.ToString(IBufferWriter1 writer, MagicalBox box, Span1 parameters)
at ZLogger.Formatters.PlainTextZLoggerFormatter.FormatLogEntry(IBufferWriter1 writer, IZLoggerEntry entry)
Which doesn't make the actual problem log line any easier to find.
MagicalBox.cs:78 throws if you have a null value in an interpolated string variable:
If you instead this is changed to:
this it handles it correctly without any further changes. The exception thrown by it causes very hard to track down errors in the log file and the InternalErrorLogger just shows:
Which doesn't make the actual problem log line any easier to find.