TraCI Exception Handling in Veins

30 Views Asked by At

I'm trying to dynamically re-route vehicles to the current road of another vehicle – which will sometimes fail if a route does not exist.

traciVehicle->changeTarget(…) will throw a cRuntimeError, but so long as debug-on-errors = true in my omnetpp.ini, my try-catch block will be ignored and the simulation aborted.

Besides disabling this debug mode, is there another way to recover from TraCI errors?

(In a first test scenario with Python and without Veins, the SUMO simulation was able to continue running if changeTarget was wrapped in a try-except block.)

0

There are 0 best solutions below