| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| To report an error and abort the current transaction, throw a `TextException("descriptive text", Here())`. | ||
| Use `Assure(condition)` to test an invariant and abort the current transaction. | ||
| To check system-leve invariants, where a failure needs to terminate Squid, use `xassert(condition)` |
There was a problem hiding this comment.
| To check system-leve invariants, where a failure needs to terminate Squid, use `xassert(condition)` | |
| To check system-level invariants, where a failure needs to terminate Squid, use `xassert(condition)` |
Sorry, something went wrong.
|
There is also static_assert for compile-time invariant. Alex has some very specific requirements about wording the descriptions there. It would be useful to mention what "report" means: where, how, and what does it look like for each of these cases? Also, IIRC Alex had a definition of "invariant" that did not quite line up with C/C++ standard definition of the terminology. I came away from the Must() vs Assure() discussion thinking there was a disjoint paradigm in play. |
Sorry, something went wrong.
There was a problem hiding this comment.
I welcome this attempt at documenting error handling and invariant checking guidelines. Related code is often problematic, and documentation can help reduce the number of problems and correction overheads.
There is at least one bug and several problematic statements in the current version. It is also very difficult to derive the correct decision making algorithm from the proposed sentences. As Amos has noted, it is probably best to cover static_assert cases here as well.
I will find the time to rewrite this. I do not recommend making changes until then.
Sorry, something went wrong.
It's more than this. Coding Guidelines can (and should) feed LLMs, both code-writing and code-reviewing ones.
Feel free to improve |
Sorry, something went wrong.
@kinkie, I found my notes and started working on porting them here, but I will need to find more time. P.S. I am not allowed to push to your branch. |
Sorry, something went wrong.
Thanks!
Can you now? I've added committers as maintainers for this repository |
Sorry, something went wrong.
No, I cannot. remote: error: GH006: Protected branch update failed for refs/heads/coding-guidelines-error-reporting. remote: remote: - Changes must be made through a pull request. Initially, I thought that you needed to follow GitHub instructions, but I now realize that there is another/bigger problem here: You have created a pull request branch in the official repository instead of using your own repository. My recommendation is to keep this PR "as is" for now. I will post an alternative PR that starts with your changes. It will use an unofficial branch, of course. If that PR looks promising, we will close this PR and delete its official branch while collaborating on that alternative PR. |
Sorry, something went wrong.
I have used Github's "edit" feature. Unless I did something wrong, I suppose that the feature may not be good for us |
Sorry, something went wrong.
Sounds good, thanks. |
Sorry, something went wrong.
You are probably right. I have not checked, but I suspect that:
The ball is on my side to post that "alternative PR that starts with your changes". |
Sorry, something went wrong.
Done at #50. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.