mirror of
https://github.com/godotengine/godot.git
synced 2024-11-30 16:12:46 +00:00
Merge pull request #75465 from RedworkDE/signal-disconnect-error
Improve error message when disconnecting callable from signal it was not connected to
This commit is contained in:
commit
9b1b50f2eb
@ -1350,7 +1350,7 @@ bool Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
|
||||
}
|
||||
ERR_FAIL_COND_V_MSG(!s, false, vformat("Disconnecting nonexistent signal '%s' in %s.", p_signal, to_string()));
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!s->slot_map.has(*p_callable.get_base_comparator()), false, "Disconnecting nonexistent signal '" + p_signal + "', callable: " + p_callable + ".");
|
||||
ERR_FAIL_COND_V_MSG(!s->slot_map.has(*p_callable.get_base_comparator()), false, "Attempt to disconnect a nonexistent connection from '" + to_string() + "'. Signal: '" + p_signal + "', callable: '" + p_callable + "'.");
|
||||
|
||||
SignalData::Slot *slot = &s->slot_map[*p_callable.get_base_comparator()];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user