forked from jasder/antlr
Map NoSuchElementException to InvalidOperationException
This commit is contained in:
parent
1a44b8e759
commit
a6bd78893d
|
@ -681,7 +681,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
{
|
{
|
||||||
if (!this.HasNext())
|
if (!this.HasNext())
|
||||||
{
|
{
|
||||||
throw new NoSuchElementException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
this.index++;
|
this.index++;
|
||||||
this.removed = false;
|
this.removed = false;
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
{
|
{
|
||||||
if (this.current >= this._enclosing.Size())
|
if (this.current >= this._enclosing.Size())
|
||||||
{
|
{
|
||||||
throw new NoSuchElementException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
while (this._enclosing.arrayData[this.currentIndex] == null)
|
while (this._enclosing.arrayData[this.currentIndex] == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,7 +182,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
{
|
{
|
||||||
if (this.current >= this._enclosing.Size())
|
if (this.current >= this._enclosing.Size())
|
||||||
{
|
{
|
||||||
throw new NoSuchElementException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
this.current++;
|
this.current++;
|
||||||
return new _KeyValuePair_166(this);
|
return new _KeyValuePair_166(this);
|
||||||
|
|
|
@ -237,7 +237,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
{
|
{
|
||||||
if (this.current >= this._enclosing.Size())
|
if (this.current >= this._enclosing.Size())
|
||||||
{
|
{
|
||||||
throw new NoSuchElementException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
this.current++;
|
this.current++;
|
||||||
return new _KeyValuePair_226(this);
|
return new _KeyValuePair_226(this);
|
||||||
|
|
|
@ -670,7 +670,7 @@ namespace Antlr4.Runtime.Misc
|
||||||
{
|
{
|
||||||
if (!this.HasNext())
|
if (!this.HasNext())
|
||||||
{
|
{
|
||||||
throw new NoSuchElementException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
this.removed = false;
|
this.removed = false;
|
||||||
return this.data[this.nextIndex++];
|
return this.data[this.nextIndex++];
|
||||||
|
|
|
@ -188,6 +188,7 @@
|
||||||
-typeMapping java.util.concurrent.CancellationException System.OperationCanceledException
|
-typeMapping java.util.concurrent.CancellationException System.OperationCanceledException
|
||||||
-typeMapping java.lang.IndexOutOfBoundsException ArgumentOutOfRangeException
|
-typeMapping java.lang.IndexOutOfBoundsException ArgumentOutOfRangeException
|
||||||
-typeMapping java.util.EmptyStackException InvalidOperationException
|
-typeMapping java.util.EmptyStackException InvalidOperationException
|
||||||
|
-typeMapping java.util.NoSuchElementException InvalidOperationException
|
||||||
-typeMapping java.io.InputStream System.IO.Stream
|
-typeMapping java.io.InputStream System.IO.Stream
|
||||||
-typeMapping java.io.InputStreamReader System.IO.StreamReader
|
-typeMapping java.io.InputStreamReader System.IO.StreamReader
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue