git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Completion of error handling

From
MEMarkus Elfring <markus.elfring@web.de>
Date
Feb 18, 2010, 15:11 UTC
Message-ID
<4B7D5887.6050502@web.de>
In-Reply-To
<4B7A79F0.1070100@op5.se>
> That's an awful lot of text to read that's hardly relevant for a C
> program. Most of it regards newbie stuff about how to handle reporting
> an error when you can't use a C++ exception.
>   

I would like to quote a bit which shows the underlying issues with the used programming language. "... Exceptional events occur. But, since they are exceptional, they occur very rarely. This is exactly the problem with them. In programming courses you learn to always handle any possible event. But, in practice, most programmers just ignore them. If you look at this problem in detail, you see that these events are not ignored where they actually occur, but at some higher level. ..."

>
> You keep on claiming that but haven't proven it in any way.

I do not want to prove this so far because return value ignorance might be a common and well-known (bad) coding practice. https://www.securecoding.cert.org/confluence/display/seccode/EXP12-C.+Do+not+ignore+values+returned+by+functions

>
> Git is written in C, not C++. Using aspectc++ would mean requiring
> the use of a C++ compiler, which git doesn't require today.

It would be nice if C++ exceptions could be used here because they can not be ignored by default. I guess that the tool "AspectC++" will also work with C constructs. Do you find the tool "AspeCt-oriented C compiler" more appealing?

> Now please stop trolling and find one of these bugs you keep talking
> about but never showing.

I would not say never. - Exceptional situations are usually expected to appear seldom.

> We've made it painfully clear to you that we're interested in realworld
> problems rather than potential ones, so all this "use this model for
> development" just reeks of concept evangelism.

The efforts for complete error code checking can be reduced by a mixture of function, class and advice libraries.

> No real engineer likes that, which is why you're facing
> such massive opposition on this list.
>   

It takes a bit more time to become comfortable with evolving software technologies.

Regards, Markus

Previous: Andreas Ericsson
Message 14 of 14 in “Completion of error handling”
  1. Markus ElfringFeb 2, 2010
  2. Nicolas PitreFeb 2, 2010
  3. Markus ElfringFeb 2, 2010
  4. Nicolas PitreFeb 2, 2010
  5. Markus ElfringFeb 2, 2010
  6. Avery PennarunFeb 2, 2010
  7. Markus ElfringFeb 2, 2010
  8. Avery PennarunFeb 2, 2010
  9. Markus ElfringFeb 2, 2010
  10. Avery PennarunFeb 2, 2010
  11. Markus ElfringFeb 2, 2010
  12. Markus ElfringFeb 11, 2010
  13. Andreas EricssonFeb 16, 2010
  14. Markus ElfringFeb 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.