<p> Attention is currently required from: Kevin Harwell. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16629">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Patchset:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16629?tab=comments">Patch Set #2:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I guess one person's error handling is another's assert :-) […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Well, it also logs the condition itself, which isn't something that can be manually done in dialplan.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Apart from the bonus d option, I feel like it's unequivocally an assert(), as close as it could be ported from C to dialplan. A compiler flag could also be added for enabling/disabling asserts to address the other concern.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If we take a different language like Java, which has both the try/catch concept as well as Throw new Exception, RaiseException is closer to that than Assert as well.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Fundamentally, the main difference I see is that RaiseException is intended for error handling, and expects that an e extension is defined so we execute code there. Assert does not allow error handling, if it is false, that is the last thing that will ever execute for the call. That's really the main goal. Error handling is for things that could go wrong, Assert is for things that should never go wrong, and if they do, it's bad enough we should just give up.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16629">change 16629</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16629"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia089c2debf608f42f5f87e6c29d50e8ebcc093e5 </div>
<div style="display:none"> Gerrit-Change-Number: 16629 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-CC: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-CC: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 25 Oct 2021 23:27:33 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>