Link Details

Link 134085 thumbnail
User 225256 avatar

By mswatcher
via explodingcoder.com
Published: Nov 16 2008 / 04:10

Some months ago I came across an anomaly in both Visual Studio 2005 and 2008 when handling exceptions in a .NET project and it threw me through a loop. I'm a fan of the ANTLR parser generator and so I was working on a project that parses some user input text. As a feature, if the parser doesn't like the input, I expect that it will throw an exception which I would catch from my code. This worked in all but one particular test case. If I provided input for which the lexer has no rules for, such as giving it a string with a semicolon when there's no rules recognizing that character, it throws a NoViableAltException to let you know it didn't know what to do with that character.
  • 7
  • 0
  • 996
  • 204

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (0)