Questions tagged [exit-strategy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
5answers
743 views

How do you use exit status code? [closed]

When the program run successfully, usually the program will return 0 status. If there any problems, the we can return value other than 0 at exit. With Exceptions, (as long as the problem is not ...
3
votes
4answers
2k views

Quit a program in main or in function?

Lets say I have a void method/function to check the arguments of the program: void check(int argc, String argv){ //some irrelevant code } In this function I have some checks to validate the ...
0
votes
0answers
50 views

Own Exception or Delegation design pattern to exit a program?

I am writing an application in Java which use MVC pattern design. I have 4 major classes: Main, Controller, Model, View. Main initialize the other three and run launchMenu() in a infinite loop, a ...
15
votes
7answers
24k views

Non-zero exit status for clean exit

Is it acceptable to return a non-zero exit code if the program in question ran properly? For example, say I have a simple program that (only) does the following: Program takes N arguments. It returns ...