Skip to content

Commit

Permalink
Log all exceptions in upload.py (#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 committed Jan 18, 2023
1 parent 6af463b commit 39b4137
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 39b4137

Please sign in to comment.