Show warning if cannot find I2P router
This commit is contained in:
@@ -16,6 +16,7 @@ import static griffon.util.GriffonApplicationUtils.isMacOSX
|
|||||||
import static groovy.swing.SwingBuilder.lookAndFeel
|
import static groovy.swing.SwingBuilder.lookAndFeel
|
||||||
|
|
||||||
import java.beans.PropertyChangeEvent
|
import java.beans.PropertyChangeEvent
|
||||||
|
import java.util.logging.Level
|
||||||
|
|
||||||
@Log
|
@Log
|
||||||
class Ready extends AbstractLifecycleHandler {
|
class Ready extends AbstractLifecycleHandler {
|
||||||
@@ -81,8 +82,15 @@ class Ready extends AbstractLifecycleHandler {
|
|||||||
props.write(it)
|
props.write(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Core core
|
||||||
Core core = new Core(props, home)
|
try {
|
||||||
|
core = new Core(props, home)
|
||||||
|
} catch (Exception bad) {
|
||||||
|
log.log(Level.SEVERE,"couldn't initialize core",bad)
|
||||||
|
JOptionPane.showMessageDialog(null, "Couldn't connect to I2P router. Make sure I2P is running and restart MuWire",
|
||||||
|
"Can't connect to I2P router", JOptionPane.WARNING_MESSAGE)
|
||||||
|
System.exit(0)
|
||||||
|
}
|
||||||
core.startServices()
|
core.startServices()
|
||||||
application.context.put("muwire-settings", props)
|
application.context.put("muwire-settings", props)
|
||||||
application.context.put("core",core)
|
application.context.put("core",core)
|
||||||
|
Reference in New Issue
Block a user