<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;">Okay I'll concede it can be used in such a manner, and in that sense would be similar to a general p […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The d option was sort of for the edge cases where, conceivably, someone would want to use this without ending the call. I figured it's better to be flexible, but the goal is to end the call in most cases. The test suite came to mind for the d option, but I think there are other requirements for that beyond the scope of Assert (e.g. AMI events).</p><p style="white-space: pre-wrap; word-wrap: break-word;">I didn't anticipate disabling the Assert once code is set for production, at least personally, so I'm not sure what's meant by this. Part of the goal is to help catch aggression and continue to enforce those expectations, so I'm envisioning these being put in and left in, where something should always be true, and if it isn't, then something's gone wrong. I guess in theory a compiler option could be added like ENFORCE_ASSERTS and then Assert() would only do something if that were true, but I'm not sure if people would find that useful.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Even with the d option, it would basically be a Log + Hangup, and there's no way to log this information from the dialplan so it's not quite the same.</p><p style="white-space: pre-wrap; word-wrap: break-word;">ErrorIf could be misleading, since this app isn't really designed for error handling. It really is almost like calling the assert() C function, except the goal is not to crash Asterisk but to crash the call. The error log is merely a side effect of that, and this isn't an Error() application. So that's why I think Assert best captures what this aims to do.</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 22:09:11 +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>