Ranjeet Deshmukh wrote:I used System.exit(0) because correct execution of all build files is the prerequisite for further Program execution.
If there are any failures in build file execution then there is no point in continuing further execution.
But
System.exit(0) terminates the program, so it won't continue to execute - unless it's part of a script that
then invokes something else.
Could you please suggest any other method to terminate the execution in more graceful way?
Well, the most obvious one to me would be to throw an Exception if an error DOES occur, and let it terminate naturally if it doesn't.
But it depends entirely on what your whole setup is, which you haven't described to us.
Winston
PS: Your code lines are
far too long, which makes this
thread difficult to read. Please read the link before you post any more code. Thanks.