Skip to content

Commit 39b4137

Browse files
authored
Log all exceptions in upload.py (#8813)
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.
1 parent 6af463b commit 39b4137

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/upload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
try:
6767
esptool.main(cmdline)
68-
except esptool.FatalError as e:
68+
except Exception as e:
6969
sys.stderr.write('\nA fatal esptool.py error occurred: %s' % e)
7070
finally:
7171
if erase_file:

0 commit comments

Comments
 (0)