Changeset 8621
- Timestamp:
- 2004-11-23T09:36:24+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r8620 r8621 51 51 import org.greenstone.gatherer.util.StaticStrings; 52 52 import org.greenstone.gatherer.util.Utility; 53 // import sun.misc.*; 53 54 54 55 55 /** Containing the top-level "core" for the Gatherer, this class is the … … 62 62 * @version 2.3 63 63 */ 64 65 // How to catch All Exceptions including those from the AWT Event thread.66 // Step 1: register a handler class in your main()67 //68 // System.setProperty("sun.awt.exception.handler", "YourHandler");69 //70 // Step 2: implement your handler class.71 //72 // public class YourHandler {73 // public void handle(Throwable thrown) {74 // eat the exception without dumping to the console.75 // }76 // }77 78 64 public class Gatherer 79 65 { … … 82 68 static final private String SKIN_DEFINITION_FILE = "lib/greenaqua/greenaqua.xml"; 83 69 84 static public boolean always_show_exceptions = true;85 70 /** Has the exit flag been set? <i>true</i> if so, <i>false</i> otherwise. */ 86 71 public boolean exit = false; … … 736 721 private String url = null; 737 722 private String[] commands = null; 738 /** Constructor.739 * @param command The initial command <strong>String</strong>.740 */741 // public BrowserApplication(String command) {742 // this.command = command;743 // }744 723 745 724 public BrowserApplication(String command, String url) { -
trunk/gli/src/org/greenstone/gatherer/GathererProg.java
r8620 r8621 44 44 * @version 2.3 45 45 */ 46 47 // How to catch All Exceptions including those from the AWT Event thread.48 // Step 1: register a handler class in your main()49 //50 // System.setProperty("sun.awt.exception.handler", "YourHandler");51 //52 // Step 2: implement your handler class.53 //54 // public class YourHandler {55 // public void handle(Throwable thrown) {56 // eat the exception without dumping to the console.57 // }58 // }59 60 46 public class GathererProg 61 47 { … … 76 62 System.setProperty("java.util.prefs.syncInterval","2000000"); 77 63 // => results in One message every 600 hours! 78 79 // Override the exception handler with a new one which we can80 // easily quiet the exceptions from.81 // System.setProperty("sun.awt.exception.handler", "GLIExceptionHandler");82 64 83 65 // Ensure platform specific LAF … … 115 97 gatherer.run(size,splash,g_man); 116 98 } 117 118 // static public class GLIExceptionHandler {119 // public void handle(Throwable thrown) {120 // if(always_show_exceptions || debug != null) {121 // thrown.printStackTrace();122 // }123 // }124 // }125 99 }
Note:
See TracChangeset
for help on using the changeset viewer.