<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I’ll just cut to the chase:</div><div class="">Why is throwing from <font color="#941751" face="PT Mono" class="">get</font>, <font color="#941751" face="PT Mono" class="">set</font>, <font color="#941751" face="PT Mono" class="">willSet</font> and <font color="#941751" face="PT Mono" class="">didSet</font> disallowed?</div><div class=""><br class=""></div><div class=""><font face="PT Mono" class=""><font color="#941751" class="">var</font> login: <font color="#008f00" class="">String</font> {</font></div><div class=""><font face="PT Mono" class=""><span class="Apple-tab-span" style="white-space:pre">        </span><font color="#941751" class="">willSet</font> <font color="#941751" class="">throws</font> {</font></div><div class=""><font face="PT Mono" class=""><span class="Apple-tab-span" style="white-space:pre">                </span><font color="#941751" class="">guard</font> newValue.count > 5 <font color="#941751" class="">else</font> {</font></div><div class=""><font face="PT Mono" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span><font color="#941751" class="">throw</font> <font color="#008f00" class="">LoginError</font>.loginTooSmall</font></div><div class=""><font face="PT Mono" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></div><div class=""><font face="PT Mono" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div class=""><font face="PT Mono" class="">}</font></div><div class=""><font face="PT Mono" class=""><br class=""></font></div><div class=""><font face="PT Mono" class=""><font color="#941751" class="">try</font> login = <font color="#0433ff" class="">“JebediahKerman”</font> <font color="#797979" class="">// totally fine</font></font></div><div class=""><font face="PT Mono" class=""><font color="#941751" class="">try</font> login = <font color="#0433ff" class="">“Bob”</font> <font color="#797979" class="">// throws `LoginError.loginTooSmall`</font></font></div><div class=""><br class=""></div></body></html>