From c1338d3e5b3bc7756a58467a8ea56a4321916835 Mon Sep 17 00:00:00 2001 From: Edan Schwartz Date: Tue, 17 Jan 2023 20:16:48 -0600 Subject: [PATCH] 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. --- tools/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/upload.py b/tools/upload.py index aee6add8f1..760d4dbbef 100755 --- a/tools/upload.py +++ b/tools/upload.py @@ -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: