Remove instances of 'raise Exception' (#7523)

This commit is contained in:
Edward Oakes
2020-03-10 17:51:22 -07:00
committed by GitHub
parent fdb528514b
commit 7b609ca211
13 changed files with 134 additions and 131 deletions
+3 -3
View File
@@ -96,9 +96,9 @@ def extract_signature(func, ignore_first=False):
if ignore_first:
if len(signature_parameters) == 0:
raise Exception("Methods must take a 'self' argument, but the "
"method '{}' does not have one.".format(
func.__name__))
raise ValueError("Methods must take a 'self' argument, but the "
"method '{}' does not have one.".format(
func.__name__))
signature_parameters = signature_parameters[1:]
return _scrub_parameters(signature_parameters)