Indicate required feature in exception message.
This commit is contained in:
		
							parent
							
								
									77be61f4c6
								
							
						
					
					
						commit
						eff0efdf40
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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}') | ||||
|  |  | |||
|  | @ -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): | ||||
|     ''' | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue