exitWith seems to jump a level too far in getOrDefaultCall's code parameter, making it irritating to use correctly. Repro code provided.
Also lacks a (documented?) magic variable for reading the input key, which seems like a strange omission.
exitWith seems to jump a level too far in getOrDefaultCall's code parameter, making it irritating to use correctly. Repro code provided.
Also lacks a (documented?) magic variable for reading the input key, which seems like a strange omission.
_testHM = createHashMap; _testHM getOrDefaultCall ["wibble", { if (true) exitWith {0} }, true]; _testHM returns: [["wibble",<null>]]
Thats the perks of exitWith https://community.bistudio.com/wiki/exitWith
if you absolutely must use exitWith in that expression, wrap it in call
_testHM = createHashMap; _testHM getOrDefaultCall ["wibble", { call {if (true) exitWith {0}} }, true]; _testHM returns: [["wibble",0]]