<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li></ol></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a></li></ol>
<li>Returns 0 at the end of the function assuming everything happens correctly</li>
</ol>
<p>And it does it all without <code>goto</code>.</p>
<h1id="Solving-a-problem-you-don’t-actually-have"><ahref="#Solving-a-problem-you-don’t-actually-have"class="headerlink"title="Solving a problem you don’t actually have"></a>Solving a problem you don’t actually have</h1><p>So, let’s revisit the claim</p>
<h2id="Solving-a-problem-you-don’t-actually-have"><ahref="#Solving-a-problem-you-don’t-actually-have"class="headerlink"title="Solving a problem you don’t actually have"></a>Solving a problem you don’t actually have</h2><p>So, let’s revisit the claim</p>
<preclass="line-numbers language-none"><codeclass="language-none"><#c user> this is solving a problem that doesn't exist<spanaria-hidden="true"class="line-numbers-rows"><span></span></span></code></pre>
<ol>
<li>We have been able to demonstrate several varieties of problems which are very real, very common, and very much present even in our beloved <strong>C</strong> language.</li>
<li>We have been able to demonstrate that <code>libakerror</code> solves these problems quite handily</li>
</ol>
<h1id="I-still-don’t-like-it"><ahref="#I-still-don’t-like-it"class="headerlink"title="I still don’t like it"></a>I still don’t like it</h1><p>And that’s fine. It’s okay for people to like different things. But if you have the same kinds of problems I’ve described here, and you love (or want to love) writing in C, but error handling has made you gunshy … Feel free to take this code and use it. It’s free (as in speech).</p>
<h2id="I-still-don’t-like-it"><ahref="#I-still-don’t-like-it"class="headerlink"title="I still don’t like it"></a>I still don’t like it</h2><p>And that’s fine. It’s okay for people to like different things. But if you have the same kinds of problems I’ve described here, and you love (or want to love) writing in C, but error handling has made you gunshy … Feel free to take this code and use it. It’s free (as in speech).</p>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li></ol></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a></li></ol>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li></ol></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-1"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Getting-roasted-in-IRC-is-motivational"><spanclass="toc-text">Getting roasted in IRC is motivational</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#There-is-no-problem-C-is-not-broken"><spanclass="toc-text">There is no problem. C is not broken.</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Because-we-can-do-better"><spanclass="toc-text">Because we can do better</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Check-errno-stupid"><spanclass="toc-text">Check errno, stupid</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#The-libakerror-way"><spanclass="toc-text">The libakerror way</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#But-the-macros-hide-a-lot-of-complexity"><spanclass="toc-text">But the macros hide a lot of complexity</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#We-don%E2%80%99t-like-it"><spanclass="toc-text">We don’t like it</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Why-I-like-it"><spanclass="toc-text">Why I like it</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-errors-get-checked"><spanclass="toc-text">Ensuring errors get checked</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Debugging-when-all-you-have-is-logs"><spanclass="toc-text">Debugging when all you have is logs</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Ensuring-cleanup-behavior-occurs-on-error"><spanclass="toc-text">Ensuring cleanup behavior occurs on error</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Managing-early-exit-handlers-with-cleanup-without-goto"><spanclass="toc-text">Managing early exit handlers with cleanup without goto</span></a></li></ol></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Solving-a-problem-you-don%E2%80%99t-actually-have"><spanclass="toc-text">Solving a problem you don’t actually have</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#I-still-don%E2%80%99t-like-it"><spanclass="toc-text">I still don’t like it</span></a></li></ol>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.