Report full traceback when highlighting fails

This commit is contained in:
Kovid Goyal 2022-03-24 11:39:31 +05:30
parent 8300436481
commit ff80b906d0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -167,7 +167,9 @@ def highlight_collection(collection: Collection, aliases: Optional[Dict[str, str
try:
highlights = future.result()
except Exception as e:
return f'Running syntax highlighting for {path} generated an exception: {e}'
import traceback
tb = traceback.format_exc()
return f'Running syntax highlighting for {path} generated an exception: {e} with traceback:\n{tb}'
ans[path] = highlights
return ans