Skip to content

Readable exception when decide for an agent fails #305

Description

@jwaa

Is your feature request related to a problem? Please describe.
When an agent's decide_on_action returns something different then the tuple (action_name, action_arguments), it raises either a type error if just one element is returns that is not an iterable or a unpack error if more then 2 are returned. However, these default exceptions do not contain a reference to the user code in them as it is done through callbacks.

Describe the solution you would like
A more readable exception thrown showing, as a minimum, what is returned and by which agent (both name and ID).

Describe alternatives you have considered
Leaving it like this is also an option, though troubles debugging for MATRX users. Another solution might be to not return two elements, but just one. Though that will ruin any backwards compatibility, nor will it actually solve the issue of MATRX users not knowing what needs to be returned.

Additional context
Identified by a MATRX user whose return values did not match the return pattern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreWork related to the core functionalityrequestA request for a new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions