The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 08-02-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by mmcds View Post
How can I get my unix shell script to capture any error exit status during my shell script?
If java throws and exception, does a stack trace then exits with an exit code of zero, then the exit code is zero.

To return an exit code you would need to call the following in the exception handler.

Code:
static void java.lang.System.exit(int status);