Skip to content

Commit 8ecd702

Browse files
committed
Replace generic Exception with specifc errors
1 parent 78d3b0c commit 8ecd702

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-cl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ def clutil_handle_branch_creation_failure() -> None:
20582058
temp_unstash_args.all = True
20592059
temp_unstash_args.force = True
20602060
cl_unstash(temp_unstash_args)
2061-
except Exception as restore_error:
2061+
except (OSError, subprocess.CalledProcessError,
2062+
json.JSONDecodeError) as restore_error:
20622063
print(f"Error restoring stashes: {restore_error}")
20632064
print("You may need to manually unstash: git cl unstash --all")
20642065

0 commit comments

Comments
 (0)