Skip to content

Commit

Permalink
Include configuration variable in error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperCraeghs committed Jan 26, 2024
1 parent 3ef2711 commit 1b97f96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mlx/warnings/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def substitute_envvar(checker_config, keys):
try:
checker_config[key] = template_obj.substitute(os.environ)
except KeyError as err:
raise WarningsConfigError(f"Failed to find environment variable {err}") from None
raise WarningsConfigError(f"Failed to find environment variable {err} for configuration value {key!r}")\
from None


class WarningsPlugin:
Expand Down

0 comments on commit 1b97f96

Please sign in to comment.