From da56e797845edcbd5c620cc7a913e66a6b294d3c Mon Sep 17 00:00:00 2001 From: Adrian Conlon <98398945+AdrianConlon@users.noreply.github.com> Date: Fri, 13 Sep 2024 22:33:09 +0100 Subject: [PATCH] Correct a couple of small parser errors --- M6502/M6502.Symbols/Parser.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/M6502/M6502.Symbols/Parser.cs b/M6502/M6502.Symbols/Parser.cs index 603bd77..6d6bdbb 100644 --- a/M6502/M6502.Symbols/Parser.cs +++ b/M6502/M6502.Symbols/Parser.cs @@ -59,7 +59,7 @@ { if (symbol.Type != "lab") { - throw new ArgumentOutOfRangeException(nameof(symbol), "Not a label"); + throw new ArgumentOutOfRangeException(nameof(symbol), symbol, "Not a label"); } this.Labels.Add(symbol); this.AddAddress(symbol); @@ -110,7 +110,7 @@ { if (symbol.Type != "equ") { - throw new ArgumentOutOfRangeException(nameof(symbol), "Not an equate"); + throw new ArgumentOutOfRangeException(nameof(symbol), symbol, "Not an equate"); } this.Equates.Add(symbol); this.AddConstant(symbol); @@ -256,7 +256,7 @@ public string MaybeGetQualifiedLabelByAddress(ushort absolute) => this.TryGetQualifiedLabelByAddress(absolute, out var label) ? label : string.Empty; - public bool TryGetQualifiedEquateyValue(ushort value, out string name) + public bool TryGetQualifiedEquateValue(ushort value, out string name) { var symbol = this.LookupEquateByValue(value); name = PrefixNamespace(symbol); @@ -451,7 +451,7 @@ var identifier = int.Parse(id); if (section.ContainsKey(identifier)) { - throw new InvalidOperationException("Invalid symbol file format (definition id has clashed)"); + throw new InvalidOperationException($"Invalid symbol file format (definition id ({identifier}) has clashed)"); } if (this._information == null)