Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readable exception when decide for an agent fails #305

Open
jwaa opened this issue Aug 3, 2021 · 0 comments
Open

Readable exception when decide for an agent fails #305

jwaa opened this issue Aug 3, 2021 · 0 comments
Labels
core Work related to the core functionality request A request for a new feature

Comments

@jwaa
Copy link
Member

jwaa commented Aug 3, 2021

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.

@jwaa jwaa added core Work related to the core functionality request A request for a new feature labels Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Work related to the core functionality request A request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant