mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Improve error messages during build.
This commit is contained in:
18
build.py
18
build.py
@@ -261,10 +261,11 @@ class Gen_compressed(threading.Thread):
|
|||||||
for error in errors:
|
for error in errors:
|
||||||
print('FATAL ERROR')
|
print('FATAL ERROR')
|
||||||
print(error['error'])
|
print(error['error'])
|
||||||
print('%s at line %d:' % (
|
if error['file']:
|
||||||
file_lookup(error['file']), error['lineno']))
|
print('%s at line %d:' % (
|
||||||
print(error['line'])
|
file_lookup(error['file']), error['lineno']))
|
||||||
print((' ' * error['charno']) + '^')
|
print(error['line'])
|
||||||
|
print((' ' * error['charno']) + '^')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
if json_data.has_key('warnings'):
|
if json_data.has_key('warnings'):
|
||||||
@@ -272,10 +273,11 @@ class Gen_compressed(threading.Thread):
|
|||||||
for warning in warnings:
|
for warning in warnings:
|
||||||
print('WARNING')
|
print('WARNING')
|
||||||
print(warning['warning'])
|
print(warning['warning'])
|
||||||
print('%s at line %d:' % (
|
if warning['file']:
|
||||||
file_lookup(warning['file']), warning['lineno']))
|
print('%s at line %d:' % (
|
||||||
print(warning['line'])
|
file_lookup(warning['file']), warning['lineno']))
|
||||||
print((' ' * warning['charno']) + '^')
|
print(warning['line'])
|
||||||
|
print((' ' * warning['charno']) + '^')
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if not json_data.has_key('compiledCode'):
|
if not json_data.has_key('compiledCode'):
|
||||||
|
|||||||
Reference in New Issue
Block a user