-
Notifications
You must be signed in to change notification settings - Fork 38
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
Detect out-of-order dates in the CLI version #12
Comments
I think it should better dont exit at all but display error and ask user for retry |
It's also a possibility, yes. I'm not sure if it's worth the extra effort, though. The difference is simply that if the program exits, the user has have to type "arrispwgen" again (besides the two dates, of course). |
but when you say quit you mean the program completely quits which mean the
terminal exists. Its better just to add a while loop saying while true then
just retry must be like 10 more code lines you can always encapsulate all
in a while loop i guess.
2016-12-13 11:09 GMT-05:00 Raúl Pedro Fernandes Santos <
notifications@github.com>:
… It's also a possibility, yes. I'm not sure if it's worth the extra effort,
though. The difference is simply that if the program exits, the user has
have to type "arrispwgen" again (besides the two dates, of course).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACMf4LwM58ntCLEI2bBRneSqw3eHHIJyks5rHsNBgaJpZM4LJTxe>
.
|
The terminal will only exit if you launch the program by double-clicking the script directly, which you normally will not do because it is installed in a "hard to reach" location and because you need to pass some arguments to it. Also, if the terminal exits when the program exits (making it implicit that you launched it via double-clicking), it means you didn't pass it any arguments, and thus the program will simply output the current day's password and exit, which means the terminal will also exit and you won't be able to see anything. In summary: I may be missing something but I don't see a case where the program exiting after being used in a normal way would cause the terminal to exit. Could you provide an example of such a situation? |
No, entonces esta bien gracias Raul!
2016-12-13 12:42 GMT-05:00 Raúl Pedro Fernandes Santos <
notifications@github.com>:
… The terminal will only exit if you launch the program by double-clicking
the script directly, which you normally will not do because it is installed
in a "hard to reach" location and because you need to pass some arguments
to it. Also, if the terminal exits when the program exits (making it
implicit that you launched it via double-clicking), it means you didn't
pass it any arguments, and thus the program will simply output the current
day's password and exit, which means the terminal will also exit and you
won't be able to see anything.
In summary: I may be missing something but I don't see a case where the
program exiting after being used in a normal way would cause the terminal
to exit.
Could you provide an example of such a situation?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACMf4Gl4GuY8mEachvFH667c5kfncCQNks5rHtj2gaJpZM4LJTxe>
.
|
Fixed. |
In the CLI version, if the user passes two dates as arguments and the first date is after the second date, arrispwgen exits with an exception thrown by the library.
The CLI version should catch the exception and exit gracefully, telling the user what the problem was.
The text was updated successfully, but these errors were encountered: