Change exception __str__ to be the type + message
Because the repr is ugly
This commit is contained in:
		
							parent
							
								
									a510c7b55c
								
							
						
					
					
						commit
						73d2ef5bbf
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -27,6 +27,9 @@ class EtiquetteException(Exception, metaclass=ErrorTypeAdder): | ||||||
|         self.error_message = self.error_message.format(*args, **kwargs) |         self.error_message = self.error_message.format(*args, **kwargs) | ||||||
|         self.args = (self.error_message, args, kwargs) |         self.args = (self.error_message, args, kwargs) | ||||||
| 
 | 
 | ||||||
|  |     def __str__(self): | ||||||
|  |         return self.error_type + '\n' + self.error_message | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| # NO SUCH | # NO SUCH | ||||||
| class NoSuch(EtiquetteException): | class NoSuch(EtiquetteException): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue