Skip to content

Commit

Permalink
Replace general exception with specific one mozilla#3337
Browse files Browse the repository at this point in the history
  • Loading branch information
fadebowaley committed Mar 9, 2023
1 parent 7d4d0b5 commit ac7ea2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ share/python-wheels/
MANIFEST
cache/
node_modules/
buggy/

# Logs
*.log
Expand Down
3 changes: 2 additions & 1 deletion bugbug/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def get_human_readable_feature_names(self):
elif type_ == "text":
feature_name = f"Combined text contains '{feature_name}'"
elif type_ not in ("data", "couple_data"):
raise Exception(f"Unexpected feature type for: {full_feature_name}")
raise ValueError(f"Unexpected feature type for: {full_feature_name}")


cleaned_feature_names.append(feature_name)

Expand Down

0 comments on commit ac7ea2e

Please sign in to comment.