-module(badmap_17).-export([update/1]).%% Compile this source file with OTP 17.update(Map)->tryupdate_1(Map),error(update_did_not_fail)catcherror:{badmap,Map}->okend,tryupdate_2(Map),error(update_did_not_fail)catcherror:{badmap,Map}->okend.update_1(M)->M#{a=>42}.update_2(M)->M#{a:=42}.