From 9c3ec592b6ffb4e8ec92cf73fcc2cd10c3b96188 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 16 Feb 2013 16:40:20 -0600 Subject: [PATCH] Updated mapping for EmptyStackException --- Antlr4.Runtime/Lexer.cs | 2 +- reference/sharpen-all-options.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Antlr4.Runtime/Lexer.cs b/Antlr4.Runtime/Lexer.cs index 5edcabc7a..2b249421b 100644 --- a/Antlr4.Runtime/Lexer.cs +++ b/Antlr4.Runtime/Lexer.cs @@ -268,7 +268,7 @@ outer_break: ; { if (_modeStack.IsEmpty()) { - throw new EmptyStackException(); + throw new InvalidOperationException(); } Mode(_modeStack.Pop()); return _mode; diff --git a/reference/sharpen-all-options.txt b/reference/sharpen-all-options.txt index ce588e8c4..e6714c11d 100644 --- a/reference/sharpen-all-options.txt +++ b/reference/sharpen-all-options.txt @@ -186,6 +186,7 @@ -typeMapping org.antlr.v4.runtime.misc.ParseCancellationException ParseCanceledException -typeMapping java.util.concurrent.CancellationException System.OperationCanceledException -typeMapping java.lang.IndexOutOfBoundsException ArgumentOutOfRangeException +-typeMapping java.util.EmptyStackException InvalidOperationException -typeMapping org.antlr.v4.runtime.misc.Tuple System.Tuple -typeMapping org.antlr.v4.runtime.misc.Tuple2<,> System.Tuple