# Failabiity of map/weak map mutation

**URL:** <https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [October 17, 2024, 5:15pm UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007 "2024-10-17T17:15:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ag3ntD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ag3ntD](https://forums.unrealengine.com/u/Ag3ntD)\
**Post date:** [October 17, 2024, 5:15pm UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007/1 "2024-10-17T17:15:50Z")

</div>

Hi,

The documentation at [Adding and Modifying Elements in a Map](https://dev.epicgames.com/documentation/en-us/uefn/map-in-verse#addingandmodifyingelementsinamap) helpfully shows the syntax for changing a value in a map or adding a new value. It also explains that these expressions can fail, and so must be in a failure context.

What is the scenario for adding an element to a map to fail? I’m asking both on general knowledge, but also from the perspective of what failure handling would be appropriate on insertion failure.

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [October 18, 2024, 7:24am UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007/2 "2024-10-18T07:24:25Z")

</div>

It’s because of some random technical constraint related to nested property mutating, see [Ask Epic: Verse - March 28 @ 10:00 AM ET - #119 by UltimateLambda](https://forums.unrealengine.com/t/ask-epic-verse-march-28-10-00-am-et/1765393/119)

---

<div class="post-metadata">

**Author:** ![Ag3ntD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ag3ntD](https://forums.unrealengine.com/u/Ag3ntD)\
**Post date:** [October 18, 2024, 2:53pm UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007/3 "2024-10-18T14:53:38Z")

</div>

Thank you, that is just what I was looking for - I also see your comment further down that thread, little chuckle from me because “out of memory” and “concurrency” were two cases I was guessing at when trying to intuit the cause of this failure.

(Just conversationally, I am new to verse so I maybe am misunderstanding the syntax, but it seems a little funny to me for that to be a run-time error. I would have expected it to be a compilation error that the struct is not fully assigned, if that is a requirement.)

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [October 18, 2024, 3:16pm UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007/4 "2024-10-18T15:16:55Z")

</div>

Verse is still very immature, we’re only testers at this stage, so yeah some things don’t make sense, given that they’re doing a very different language, but it has great features too

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 17, 2024, 3:17pm UTC](https://forums.unrealengine.com/t/failabiity-of-map-weak-map-mutation/2073007/5 "2024-11-17T15:17:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
