Merge pull request #64234 from tinmanjuggernaut/rid_messages

Expand Invalid RID Error Messages
This commit is contained in:
Clay John 2022-08-15 09:51:01 -06:00 committed by GitHub
commit 24a981289a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -1481,7 +1481,7 @@ bool BulletPhysicsServer::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis
void BulletPhysicsServer::free(RID p_rid) {
if (!p_rid.is_valid()) {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("PhysicsServer attempted to free a NULL RID.");
return;
}
@ -1540,7 +1540,7 @@ void BulletPhysicsServer::free(RID p_rid) {
bulletdelete(space);
} else {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("RID not found by PhysicsServer.");
}
}

View File

@ -554,7 +554,7 @@ COMMAND_4(agent_set_callback, RID, p_agent, Object *, p_receiver, StringName, p_
COMMAND_1(free, RID, p_object) {
if (!p_object.is_valid()) {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("NavigationServer attempted to free a NULL RID.");
return;
}
if (map_owner.owns(p_object)) {
@ -605,7 +605,7 @@ COMMAND_1(free, RID, p_object) {
memdelete(agent);
} else {
ERR_FAIL_COND("Invalid RID.");
ERR_FAIL_COND("RID not found by NavigationServer.");
}
}

View File

@ -1200,7 +1200,7 @@ bool PhysicsServerSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_a
void PhysicsServerSW::free(RID p_rid) {
if (!p_rid.is_valid()) {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("PhysicsServer attempted to free a NULL RID.");
return;
}
@ -1279,7 +1279,7 @@ void PhysicsServerSW::free(RID p_rid) {
memdelete(joint);
} else {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("RID not found by PhysicsServer.");
}
};

View File

@ -1122,7 +1122,7 @@ Physics2DServer::JointType Physics2DServerSW::joint_get_type(RID p_joint) const
void Physics2DServerSW::free(RID p_rid) {
if (!p_rid.is_valid()) {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("PhysicsServer attempted to free a NULL RID.");
return;
}
@ -1195,7 +1195,7 @@ void Physics2DServerSW::free(RID p_rid) {
memdelete(joint);
} else {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("RID not found by PhysicsServer.");
}
};

View File

@ -66,7 +66,7 @@ void VisualServerRaster::_draw_margins() {
void VisualServerRaster::free(RID p_rid) {
if (!p_rid.is_valid()) {
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("VisualServer attempted to free a NULL RID.");
return;
}
@ -86,7 +86,7 @@ void VisualServerRaster::free(RID p_rid) {
return;
}
ERR_FAIL_MSG("Invalid RID.");
ERR_FAIL_MSG("RID not found by VisualServer.");
}
/* EVENT QUEUING */