diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-12-20 20:45:11 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-12-20 20:45:11 +0000 |
commit | 243e1a6c6aaeb256d2fc8c7191f4427f43afb8a8 (patch) | |
tree | bb62427edede8bdff99997f68007aa45f0f6c606 /java/src/IceGridGUI/Application/Root.java | |
parent | Fixed various Ice.OA issues; added iceVersion (diff) | |
download | ice-243e1a6c6aaeb256d2fc8c7191f4427f43afb8a8.tar.bz2 ice-243e1a6c6aaeb256d2fc8c7191f4427f43afb8a8.tar.xz ice-243e1a6c6aaeb256d2fc8c7191f4427f43afb8a8.zip |
Better handling of bogus files
Diffstat (limited to 'java/src/IceGridGUI/Application/Root.java')
-rwxr-xr-x | java/src/IceGridGUI/Application/Root.java | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java index db14f4da7df..2522e75b4cc 100755 --- a/java/src/IceGridGUI/Application/Root.java +++ b/java/src/IceGridGUI/Application/Root.java @@ -32,7 +32,7 @@ public class Root extends ListTreeNode // Construct a normal, existing Application // public Root(Coordinator coordinator, ApplicationDescriptor desc, - boolean live, File file) + boolean live, File file) throws UpdateFailedException { super(false, null, desc.name); _coordinator = coordinator; @@ -41,18 +41,8 @@ public class Root extends ListTreeNode _file = file; _live = live; - try - { - init(); - } - catch(UpdateFailedException e) - { - // - // Impossible - // - System.err.println(e.toString()); - assert false; - } + + init(); } // @@ -720,7 +710,22 @@ public class Root extends ListTreeNode assert false; } - Root newRoot = new Root(_coordinator, desc, _live, _file); + Root newRoot; + + try + { + newRoot = new Root(_coordinator, desc, _live, _file); + } + catch(UpdateFailedException e) + { + JOptionPane.showMessageDialog( + _coordinator.getMainFrame(), + e.toString(), + "Bad Application Descriptor: Unable reload Application", + JOptionPane.ERROR_MESSAGE); + return; + } + ApplicationPane app = _coordinator.getMainPane().findApplication(this); assert app != null; app.setRoot(newRoot); |