Add an error message, see also #1139.

This commit is contained in:
Dave Halter
2018-06-07 21:01:41 +02:00
parent e2cd228aad
commit 5dab97a303

View File

@@ -342,7 +342,7 @@ class BaseDefinition(object):
followed = list(self._name.infer())
if not followed or not hasattr(followed[0], 'py__call__'):
raise AttributeError()
raise AttributeError('There are no params defined on this.')
context = followed[0] # only check the first one.
return [Definition(self._evaluator, n) for n in get_param_names(context)]