Skip to content

Commit 011ef5b

Browse files
committed
cli/__init__.py: catch a syntax error when re-compiling the target file
1 parent b42c61c commit 011ef5b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pybricksdev/cli/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ async def reconnect_hub():
351351
case _:
352352
return
353353

354+
except SyntaxError as e:
355+
print("There was a syntax error in your file:")
356+
print(e, "\n")
357+
354358
except HubPowerButtonPressedError:
355359
# This means the user pressed the button on the hub to re-start the
356360
# current program, so the menu was canceled and we are now printing

0 commit comments

Comments
 (0)