NotEnoughGoods Exception¶
-
exception
abce.
NotEnoughGoods
(_agent_name, good, amount_missing)[source]¶ Bases:
Exception
Methods raise this exception when the agent has less goods than needed
These functions (self.produce, self.offer, self.sell, self.buy) should be encapsulated by a try except block:
try: self.produce(...) except NotEnoughGoods: alternative_statements()