Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jetbrains: Clean up and fix logging and error handling #1445

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

auscompgeek
Copy link
Collaborator

  • Remove a bunch of un-useful prints
  • Instead of erroring silently when it fails to send the request to the IDE, notify the user
  • Remove the unused extendCommands variable

@auscompgeek auscompgeek changed the title jetbrains: Clean up and fix error handling jetbrains: Clean up and fix logging and error handling May 25, 2024
for cmd in command_list:
if cmd:
send_idea_command(cmd.strip())
actions.sleep(0.1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be done in this PR but we should really see if this can be removed. It makes the running of multiple actions like idea_grab() unnecessarily slower/jankier.

(I ran with it removed for many months, but I've since diverged from community enough that it'd be good for someone else to test too)

actions.sleep(0.1)
except Exception as e:
app.notify(e)
raise e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to recommend just raise, but it looks like in Python 3 this doesn't actually remove any of the context, waited under Python 2? https://stackoverflow.com/a/45986945/303833

@timo
Copy link
Contributor

timo commented Aug 14, 2024

#1411 is there and does something similar. which of the two do you prefer @auscompgeek ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants