-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion of error handling #28
Comments
Here it depends. In some cases return values are not checked for errors -DAR |
Would you like to detect every error situation as early as possible? |
Would you like to detect every error situation as early as possible?
Good question. It depends. Preference is earlier the better _unless_
late detection leads to same outcome (program crashes with error) _and_ a
late detection is more efficient in critical code. As a corollary, I am
perfectly happy with a seg fault to occur as opposed to providing the user
with obscure information they cannot do anything with. So if you perform
10 steps, all of which can fail, but the 10th step is guaranteed to fail
if any of the prior 9 failed, then I would check the 10th step late. In
critical code. Its just a tradeoff. Hope that explains what might be an
odd response of "maybe". However, in most cases, yes, detecting error as
early as possible is best. I should mention I introduced clerrno and
oclerrno to provide better error reporting, but I am certain I have not
made full use of it. Any improvements to error reporting, I would tie to
that system modeled after errno. I can say more about why if interested.
…-DAR
|
How do you think about to improve static source code analysis also for your software? Do you find information sources like the following useful?
|
Possibly. Can you recommend a tool that would be particularly good with
To my understanding, the concept might be useful, but I would need to see Thanks for the suggestions. I do appreciate them. -DAR |
I recommend to pick an improved analysis tool at all. I suggest to avoid ignorance of return values a bit more. Are you interested to apply aspect-oriented software development? |
Would you like to add more error handling for return values from functions like the following?
The text was updated successfully, but these errors were encountered: