Indicate required feature in exception message.

This commit is contained in:
voussoir 2020-01-29 23:52:25 -08:00
parent 77be61f4c6
commit eff0efdf40
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ def required_feature(features):
pass pass
elif cfg is False: elif cfg is False:
raise exceptions.FeatureDisabled(method.__qualname__) raise exceptions.FeatureDisabled(feature)
else: else:
raise ValueError(f'Bad required_feature: "{feature}" led to {cfg}') raise ValueError(f'Bad required_feature: "{feature}" led to {cfg}')

View file

@ -178,7 +178,7 @@ class FeatureDisabled(EtiquetteException):
''' '''
For when features of the system have been disabled by the configuration. For when features of the system have been disabled by the configuration.
''' '''
error_message = 'This feature has been disabled.' error_message = 'This feature has been disabled. Requires {}.'
class NotExclusive(EtiquetteException): class NotExclusive(EtiquetteException):
''' '''