checkTest(0, returnFlag, "ExceptionDescribe");
  public static void main(String args[]) {    int returnValue;    boolean returnFlag;    int intArray[] = new int[10];    System.loadLibrary("NativeException");    if (args.length!=0) {      if (args[0].equals("-quiet")) {	verbose = false;		setVerboseOff();      } 	    }        /****************************************************     * Exception passing through native code without being handled     */    try {      returnFlag = testPassThrough(intArray);  // shouldn't return here      returnFlag = false;    } catch (Exception e) {      printVerbose("Caught exception:  expected ArrayIndexOutOfBoundsException, got " +		   e.toString());      returnFlag = true;    }    checkTest(0, returnFlag, "Exception pass through");            /****************************************************     * check for exception in native code     */    try {      returnFlag = testExceptionOccured(intArray);  // shouldn't return here          } catch (Exception e) {      printVerbose("Caught exception:  expected ArrayIndexOutOfBoundsException, got " +		   e.toString());    }            /****************************************************     * check for exception being cleared in native code     */    try {      returnFlag = testExceptionClear(intArray);      } catch (Exception e) {      returnFlag = false;  // shouldn't be here          }    checkTest(0, returnFlag, "ExceptionClear");    /****************************************************     * print exception trace and clear     */    try {      returnFlag = testExceptionDescribe(intArray);      } catch (Exception e) {      returnFlag = false;  // shouldn't be here          }    checkTest(0, returnFlag, "ExceptionDescribe");    /****************************************************     * give the native code an exception to throw     */    try {      returnFlag = testExceptionThrow(new Exception("Test Throw in native"));        returnFlag = false;  // shouldn't be here      } catch (Exception e) {      printVerbose("Caught exception:  got " + e.toString());            returnFlag = true;      }    checkTest(0, returnFlag, "ExceptionThrow");    /****************************************************     * give the native code an exception class to throw     */    try {      Class ecls = Class.forName("java.lang.Exception");      returnFlag = testExceptionThrowNew(ecls);        returnFlag = false;  // shouldn't be here      }    catch (ClassNotFoundException e1) {      returnFlag = false;  // shouldn't be here            }    catch (Exception e) {      printVerbose("Caught exception:  got " + e.toString());            returnFlag = true;      }    checkTest(0, returnFlag, "ExceptionThrowNew");    /****************************************************     * let the native code declare FatalError and exit the JVM     */    try {      returnFlag = testFatalError(allTestPass, intArray);        returnFlag = false;  // shouldn't be here                } catch (Exception e) {      returnFlag = false;  // shouldn't be here          }    checkTest(0, returnFlag, "FatalError");    // Summarize    if (allTestPass)      System.out.println("PASS: NativeException");  // won't reach here if FatalError test succeeds    else       System.out.println("FAIL: NativeException");  }