/// <summary> /// The main entry point for the application. /// </summary> static int Main(string[] args) { try { StressTesterExec stressTesterExec = new StressTesterExec( ); // parse any command line arguments... stressTesterExec.parseCommandLineArgs(args); if (!RunTest.printingUsageInfo) { TestFramework.Log.Log.printTestStatus("==> TEST PASSED! <=="); } return(0); } catch (TestExceptions) { // Exceptions that have occurred have been rethrown, but // they were already printed out, so we just catch it here. // if any exception occurs, it is thrown again... // this prevents us from causing an unhandled exception... } catch (Exception e) { // Catch ANY other exception and print out an error. TestFramework.Log.Log.printError("\nMessage:\n\n" + e.Message + "\n\nStack Trace:\n\n" + e.StackTrace); } finally { // Close the logfile if it is open... if (TestFramework.Log.Log.logWriter != null) { TestFramework.Log.Log.logWriter.Close( ); } // Kill any existing Holodecks running on the machine... KillAll("HolodeckGUI"); } if (!RunTest.printingUsageInfo) { TestFramework.Log.Log.printTestStatus("==> TEST FAILED! <=="); } // some exception occurred... return(1); }
/// <summary> /// The main entry point for the application. /// </summary> static int Main(string[] args) { try { StressTesterExec stressTesterExec = new StressTesterExec( ); // parse any command line arguments... stressTesterExec.parseCommandLineArgs( args ); if ( ! RunTest.printingUsageInfo ) TestFramework.Log.Log.printTestStatus( "==> TEST PASSED! <==" ); return 0; } catch ( TestExceptions ) { // Exceptions that have occurred have been rethrown, but // they were already printed out, so we just catch it here. // if any exception occurs, it is thrown again... // this prevents us from causing an unhandled exception... } catch ( Exception e ) { // Catch ANY other exception and print out an error. TestFramework.Log.Log.printError( "\nMessage:\n\n" + e.Message + "\n\nStack Trace:\n\n" + e.StackTrace ); } finally { // Close the logfile if it is open... if ( TestFramework.Log.Log.logWriter != null ) TestFramework.Log.Log.logWriter.Close( ); // Kill any existing Holodecks running on the machine... KillAll( "HolodeckGUI" ); } if ( ! RunTest.printingUsageInfo ) TestFramework.Log.Log.printTestStatus( "==> TEST FAILED! <==" ); // some exception occurred... return 1; }