<p> Attention is currently required from: Joshua Colp. </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 #1:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Most individuals writing dialplan or looking at it would not know what assert() means in C. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Okay, well people doing test cases and other testing in the dialplan would use it in a way similar to assert() in C. Serious programmers will know what it is intuitively from the name, I'm not expecting newbies to verify correctness of their dialplan, it's mainly for more complicated environments.<br>There already are applications like RaiseException(), so this is along the same theme as that.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Test suite was just a thought, but not why I wrote it. Although, the "d" option to Assert makes it not hang up when it encounters a failure, so if it weren't for the AMI bit it still seems like that would be a lot simpler.</p><p style="white-space: pre-wrap; word-wrap: break-word;">FWIW, I tried doing it as you mentioned, using Log/ExecIf/GotoIf/Hangup and it just doesn't scale well. It gets very messy very quickly. My dialplan is tens of thousands of lines long, and it isn't feasible to clutter things up with branching and conditionals everywhere for verifying things are as they should be, so this is a very lightweight and simple way to do that that semantically makes sense in the dialplan, similar to RaiseException(). This makes it cheap and a lot more practical to catch bugs and ensure correctness *before* things go wrong.</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-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 24 Oct 2021 16:23:17 +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: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Comment-In-Reply-To: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>