Skip to content
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 #109

Open
elfring opened this issue Jul 17, 2018 · 4 comments
Open

Completion of error handling #109

elfring opened this issue Jul 17, 2018 · 4 comments

Comments

@elfring
Copy link

elfring commented Jul 17, 2018

Would you like to add more error handling for return values from functions like the following?

@adrianlopezroche
Copy link
Owner

For strdup, yes. For printf... why?

@elfring
Copy link
Author

elfring commented Jul 19, 2018

I suggest to avoid ignorance of return values a bit more.

  • Would you like to detect every error situation as early as possible?
  • Do you care for file output failures?

@adrianlopezroche
Copy link
Owner

adrianlopezroche commented Jul 23, 2018

Fixed for strdup in grokdir, commit c671a2b.

Dealing with printf seems rather more complicated, as it returns a positive number of bytes read even when output is redirected to /dev/full. I don't know how to get printf to return an error when stdout is full.

@elfring
Copy link
Author

elfring commented Jul 30, 2018

Can you get any further software development ideas from the following command example?

elfring@Sonne:~> LANG=C echo X > /dev/full
bash: echo: write error: No space left on device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants