DrPaulBrewer / single-market-robot-simulator

Runs numerical experiments for a single market populated by robot traders
Other
7 stars 5 forks source link

Bad configurations can throw "TypeError: Cannot read property 'length' of undefined" #32

Open DrPaulBrewer opened 4 years ago

DrPaulBrewer commented 4 years ago

I noticed this error on the econ1.net website after I managed to accidentally remove buyerAgentType and sellerAgentType arrays and then tried to run a study that didn't have these required settings.

Notice that this issue has to do with array-valued properties (because .length is implicated).

What I would like it to do: The console error message should explain which required variables are missing

What it did instead: Told me that it couldn't read the length of an undefined variable, without telling me which variable is undefined.

This doesn't impact normal, correct operations.