/// <summary> /// The main entry point for the application. /// </summary> static int Main(string[] args) { try { ResourcesPaneTest resourcesPaneTest = new ResourcesPaneTest( ); // parse any command line arguments... resourcesPaneTest.parseCommandLineArgs(args); if (!RunTest.printingUsageInfo) { 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. Log.printError("\nMessage:\n\n" + e.Message + "\n\nStack Trace:\n\n" + e.StackTrace); } finally { // Close the logfile if it is open... if (Log.logWriter != null) { Log.logWriter.Close( ); } } if (!RunTest.printingUsageInfo) { Log.printTestStatus("==> TEST FAILED! <=="); } // some exception occurred... return(1); }
/// <summary> /// The main entry point for the application. /// </summary> static int Main(string[] args) { try { ResourcesPaneTest resourcesPaneTest = new ResourcesPaneTest( ); // parse any command line arguments... resourcesPaneTest.parseCommandLineArgs( args ); if ( ! RunTest.printingUsageInfo ) 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. Log.printError( "\nMessage:\n\n" + e.Message + "\n\nStack Trace:\n\n" + e.StackTrace ); } finally { // Close the logfile if it is open... if ( Log.logWriter != null ) Log.logWriter.Close( ); } if ( ! RunTest.printingUsageInfo ) Log.printTestStatus( "==> TEST FAILED! <==" ); // some exception occurred... return 1; }