[commands] Properly propagate CommandError derived exceptions.
If a command or a group raised a CommandError derived exception it would be wrapped into CommandInvokeError. This fixes this case so it raises the original exception instead.
This commit is contained in:
		| @@ -48,6 +48,8 @@ def inject_context(ctx, coro): | ||||
|  | ||||
|         try: | ||||
|             ret = yield from coro(*args, **kwargs) | ||||
|         except CommandError: | ||||
|             raise | ||||
|         except Exception as e: | ||||
|             raise CommandInvokeError(e) from e | ||||
|         return ret | ||||
|   | ||||
		Reference in New Issue
	
	Block a user