[commands] Exceptions raised while invocation raise CommandInvokeError.
This change should make it a bit more intuitive to get the original exception without having the gotcha of checking ``isinstance`` inside the error handler.
This commit is contained in:
@@ -47,7 +47,7 @@ def inject_context(ctx, coro):
|
||||
try:
|
||||
ret = yield from coro(*args, **kwargs)
|
||||
except Exception as e:
|
||||
raise CommandError("Exception raised while executing command") from e
|
||||
raise CommandInvokeError(e) from e
|
||||
return ret
|
||||
return wrapped
|
||||
|
||||
|
||||
Reference in New Issue
Block a user