Increase verbosity of some assertion failure messages

This commit is contained in:
Jonathan G Rennison
2018-01-29 00:18:49 +00:00
parent 1615137481
commit bb6b8d8cd6
2 changed files with 3 additions and 2 deletions

View File

@@ -803,7 +803,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling)
return; return;
} }
} else { } else {
assert(real_timetable_order == real_current_order); assert_msg(real_timetable_order == real_current_order, "%u, %u", v->cur_real_order_index, v->cur_timetable_order_index);
} }
if (just_started) return; if (just_started) return;

View File

@@ -200,7 +200,8 @@ void Train::ConsistChanged(ConsistChangeFlags allowed_changes)
const RailVehicleInfo *rvi_u = RailVehInfo(u->engine_type); const RailVehicleInfo *rvi_u = RailVehInfo(u->engine_type);
/* Check the this->first cache. */ /* Check the this->first cache. */
assert(u->First() == this); assert_msg(u->First() == this, "u: %s, this: %s",
scope_dumper().VehicleInfo(u), scope_dumper().VehicleInfo(this));
/* update the 'first engine' */ /* update the 'first engine' */
u->gcache.first_engine = this == u ? INVALID_ENGINE : first_engine; u->gcache.first_engine = this == u ? INVALID_ENGINE : first_engine;