Added error throwing when stack is empty and PopIndent() is called

This commit is contained in:
Melodi
2025-01-14 14:25:20 +10:00
parent 88c5b5cb41
commit 148278417f

View File

@@ -176,6 +176,8 @@ public abstract class TextRendererBase<T> : TextRendererBase where T : TextRende
{
if (this.indents.Count > 0)
indents.RemoveAt(indents.Count - 1);
else
throw new InvalidOperationException("No indent to pop");
}
public void ClearIndent() => indents.Clear();