Skip to content

Commit

Permalink
Properly handle exception from missing vscode config json file
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Jan 14, 2025
1 parent a7d3488 commit 3b9d917
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion cursorless-talon/src/apps/vscode_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def vscode_get_setting_with_fallback(
return actions.user.vscode_get_setting(key, default_value), False
except Exception:
print(fallback_message)
traceback.print_exc()
return fallback_value, True


Expand Down
6 changes: 5 additions & 1 deletion cursorless-talon/src/marks/decorated_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ def setup_hat_styles_csv(hat_colors: dict[str, str], hat_shapes: dict[str, str])
def init_hats(hat_colors: dict[str, str], hat_shapes: dict[str, str]):
setup_hat_styles_csv(hat_colors, hat_shapes)

vscode_settings_path: Path = actions.user.vscode_settings_path().resolve()
try:
vscode_settings_path: Path = actions.user.vscode_settings_path().resolve()
except Exception as ex:
print(ex)
return lambda: None

def on_watch(path, flags):
global fast_reload_job, slow_reload_job
Expand Down

0 comments on commit 3b9d917

Please sign in to comment.