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

PSET4 - Recover, Additional error case? #50

Closed
butuzov opened this issue Feb 11, 2017 · 2 comments
Closed

PSET4 - Recover, Additional error case? #50

butuzov opened this issue Feb 11, 2017 · 2 comments

Comments

@butuzov
Copy link

butuzov commented Feb 11, 2017

I beg a pardon if this is not apropriate place to ask such questions, but unfortunatelly i can't find more appropriate place to ask it.

In Problem Set 4, Specifications described only 2 error states:

  1. Your program should accept exactly one command-line argument, the name of a forensic image from which to recover JPEGs. + If your program is not executed with exactly one command-line argument, it should remind the user of correct usage, as with fprintf (to stderr), and main should return 1.

  2. If the forensic image cannot be opened for reading, your program should inform the user as much, as with fprintf (to stderr), and main should return 2.

Aren't we suppose also to return error (let's say with a code 3), in case if program can't create a restored image file. Here is a code i am talking about that cover this missing note

@dlloyd09
Copy link
Contributor

Hi @butuzov. The only two we're demanding students do are the two you point out. Technically the third thing you are pointing out there is something we would generally hope students would figure out as a matter of good design of working with files, but we don't explicitly mention it in the spec. Good question though, and the fact that you do anticipate this error and handle it is a great thing, it shows you're thinking about design in the right way!

@butuzov
Copy link
Author

butuzov commented Feb 12, 2017

Hi Doug.
Well that makes sense and thank you for kind words!

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