Currently, when an exeption happens during a build, the raw exception is printed. I suggest catching the exception and printing additionally the file that it happened in.
E.g. during nedoc run on my project it encountered an unsupported character. Actual output (attached) unfortunately doesn't tell me when to look for it to correct.
$ python -m nedoc build
parsing: 1%|โโโโ | 43/3366 [00:01<06:07, 9.05it/s]multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Python36_x86\python-3.6.1\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "C:\Python36_x86\python-3.6.1\lib\site-packages\nedoc\parse.py", line 108, in parse_path
code = f.read()
File "C:\Python36_x86\python-3.6.1\lib\encodings\cp1250.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 308: character maps to
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Python36_x86\python-3.6.1\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Python36_x86\python-3.6.1\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python36_x86\python-3.6.1\lib\site-packages\nedoc_main.py", line 4, in
main()
File "C:\Python36_x86\python-3.6.1\lib\site-packages\nedoc\cmd.py", line 72, in main
c.build()
File "C:\Python36_x86\python-3.6.1\lib\site-packages\nedoc\core.py", line 111, in build
self.build_modules()
File "C:\Python36_x86\python-3.6.1\lib\site-packages\nedoc\core.py", line 97, in build_modules
zip(paths, processed), total=len(paths), desc="parsing"):
File "C:\Python36_x86\python-3.6.1\lib\site-packages\tqdm_tqdm.py", line 833, in iter
for obj in iterable:
File "C:\Python36_x86\python-3.6.1\lib\multiprocessing\pool.py", line 699, in next
raise value
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 308: character maps to