mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -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();
|
||||
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());
|
||||
_repository->send_datagram(dg);
|
||||
} else {
|
||||
#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