mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
more verbose error when out of range
This commit is contained in:
parent
bf95301ca2
commit
66c6df9d92
@ -276,9 +276,23 @@ finish_send_update(DCPacker &packer) {
|
|||||||
|
|
||||||
packer.pop();
|
packer.pop();
|
||||||
bool pack_ok = packer.end_pack();
|
bool pack_ok = packer.end_pack();
|
||||||
nassertv(pack_ok);
|
if (pack_ok) {
|
||||||
|
Datagram dg(packer.get_data(), packer.get_length());
|
||||||
|
_repository->send_datagram(dg);
|
||||||
|
|
||||||
Datagram dg(packer.get_data(), packer.get_length());
|
} else {
|
||||||
_repository->send_datagram(dg);
|
#ifndef NDEBUG
|
||||||
|
if (packer.had_range_error()) {
|
||||||
|
ostringstream error;
|
||||||
|
error << "Node position out of range for DC file: "
|
||||||
|
<< _node_path << " pos = " << _node_path.get_pos()
|
||||||
|
<< " hpr = " << _node_path.get_hpr();
|
||||||
|
nassert_raise(error.str());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
nassert_raise("Unexpected pack error in DC file.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user