From: <mg...@us...> - 2007-02-07 01:01:15
|
Revision: 362 http://svn.sourceforge.net/obo/?rev=362&view=rev Author: mgibson Date: 2007-02-06 17:01:05 -0800 (Tue, 06 Feb 2007) Log Message: ----------- on getting a config exception from -c or -i config loading now instead of awkwardly exiting which is particularly awkward in webstart as ya lose the output and ya have no idea what happened - it attempts to load the default config (with msg to stdout) - if that fails phenote still comes up though it looks rather silly with no configging - but probably still better than just keeling over (especially in webstart) - and eventually if theres gui config a user could even just config something up at that point. Modified Paths: -------------- phenote/trunk/src/java/phenote/main/Phenote.java Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-07 00:40:54 UTC (rev 361) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-07 01:01:05 UTC (rev 362) @@ -138,9 +138,16 @@ else // no command line config file specified - use last one specified (cache) Config.inst().loadDefaultConfigFile(); } catch (ConfigException e) { - LOG.fatal("EXITING! Fatal error in config file: "+e.getMessage()); + //LOG.fatal("EXITING! Fatal error in config file: "+e.getMessage()); + LOG.error("Error in config file! "+e.getMessage()); e.printStackTrace(); // log? - System.exit(1); + //System.exit(1); // isnt this a bit extreme? + System.out.println("Yikes! config exception "+e+" gonna try loading default" + +" config"); + try { Config.inst().loadDefaultConfigFile(); } + catch (ConfigException ce) { + System.out.println("bummer - even default config fails. we're hosed! "+ce); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |