Archived
1
0

Another error message cleanup

This commit is contained in:
Jacob Alexander 2015-10-12 22:59:12 -07:00
parent 25c836048e
commit 274dd6c17b

8
kll.py
View File

@ -685,14 +685,14 @@ def processKLLFile( filename ):
data = file.read() data = file.read()
try: try:
tokenSequence = tokenize( data ) tokenSequence = tokenize( data )
except LexerError as e: except LexerError as err:
print ( "{0} Tokenization error in '{1}' - {2}".format( ERROR, filename, e ) ) print ( "{0} Tokenization error in '{1}' - {2}".format( ERROR, filename, err ) )
sys.exit( 1 ) sys.exit( 1 )
#print ( pformat( tokenSequence ) ) # Display tokenization #print ( pformat( tokenSequence ) ) # Display tokenization
try: try:
tree = parse( tokenSequence ) tree = parse( tokenSequence )
except NoParseError as e: except (NoParseError, KeyError) as err:
print ( "{0} Parsing error in '{1}' - {2}".format( ERROR, filename, e ) ) print ( "{0} Parsing error in '{1}' - {2}".format( ERROR, filename, err ) )
sys.exit( 1 ) sys.exit( 1 )