<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/140085>140085</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-doc] Use ExitOnError over manually handling exit conditions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
clang-doc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ilovepi
</td>
</tr>
</table>
<pre>
clang-doc uses a lot of manual error checks, most of which exit the program, particularly when opening or manipulating files. We should prefer automated facilities, like `llvm:: ExitOnError` to do this in a consistent manner, and improve maintainability.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxMkbFy5CwQhJ8GJVPeQmjRrgIF_m1v-kdXFyMxkuaMGBWM1t63v0LnOl9EAUN305_LmeaI2Cv7n7Kvldtl4dRT4DtuVA3sH_0YXJyfPI-wZ8zgILAAT7C6uLsAmBInGBcc37MyL7ByPq4_FhoXwE8SkAVhSzwnt5aJzSWhcQ8uhQd8LBiBN4wUZ-BUVGnbg5OynyhgPsFPhLzwHjxsCSdM4Hbh1Ql6mNxIgYTw8A70jqBaHcJ9Vc2zap7h7ZPk__hWQqpWgzB4BlkoA0VwMHLMlAWjFOeIqci46IHWLfEdYXUUxVF0Q_F5nCrfN75rOldhX1_Ol8acW9NUS1-b9qpr66fGDWbwne1sO3b-OlwvXptWV9Qbbay2ta2tvejmNHl_sR229cV2DbZanTWujsKpxD9xmivKece-Pmt9tVVwA4Z8kDJmZvYwUcoCx5AyRpkXZcxfWuXEvlapL2pPwz5nddaBsuRvfSEJB_vvV_YVfmT8tzbgO6Yv2uEBi4s-FDgH2pGjJyGOudpT6BeRLZfmzU2Z20yy7MNp5FWZ28Hkz_K0Jf6FoyhzO8JnZW5fn7z35ncAAAD__3hr3W0">