Skip to content

Commit

Permalink
Log all exceptions in upload.py (esp8266#8813)
Browse files Browse the repository at this point in the history
Currently some exceptions cause a exit code 2, but without any relevant error message.

As an example, I had an issue with my USB drivers. But the only message I saw using the Arduino IDE was: uploading error: exit status 2. With this code change I could see a more specific Resource busy error message, which helped me identify the actual problem.
  • Loading branch information
eschwartz authored and hasenradball committed Nov 18, 2024
1 parent 75cffc1 commit c1338d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

try:
esptool.main(cmdline)
except esptool.FatalError as e:
except Exception as e:
sys.stderr.write('\nA fatal esptool.py error occurred: %s' % e)
finally:
if erase_file:
Expand Down

0 comments on commit c1338d3

Please sign in to comment.