From c18332740c0de71e3fafae3586456d98bcca72a8 Mon Sep 17 00:00:00 2001 From: aaronp64 Date: Sun, 16 Nov 2025 11:21:49 -0500 Subject: [PATCH] Include key in Dictionary::operator[] error message Include key in error message when lookup fails --- core/variant/dictionary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/variant/dictionary.cpp b/core/variant/dictionary.cpp index b2a7de782ae..b9ab03249a7 100644 --- a/core/variant/dictionary.cpp +++ b/core/variant/dictionary.cpp @@ -133,7 +133,7 @@ const Variant &Dictionary::operator[](const Variant &p_key) const { } else { static Variant empty; const Variant *value = _p->variant_map.getptr(key); - ERR_FAIL_COND_V_MSG(!value, empty, "Bug: Dictionary::operator[] used when there was no value for the given key, please report."); + ERR_FAIL_COND_V_MSG(!value, empty, vformat(R"(Bug: Dictionary::operator[] used when there was no value for the given key "%s". Please report.)", key)); return *value; } }