diff --git a/etiquette/decorators.py b/etiquette/decorators.py index 9ee6964..f457af7 100644 --- a/etiquette/decorators.py +++ b/etiquette/decorators.py @@ -40,7 +40,7 @@ def required_feature(features): pass elif cfg is False: - raise exceptions.FeatureDisabled(method.__qualname__) + raise exceptions.FeatureDisabled(feature) else: raise ValueError(f'Bad required_feature: "{feature}" led to {cfg}') diff --git a/etiquette/exceptions.py b/etiquette/exceptions.py index 38e08c7..517298b 100644 --- a/etiquette/exceptions.py +++ b/etiquette/exceptions.py @@ -178,7 +178,7 @@ class FeatureDisabled(EtiquetteException): ''' 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): '''