VIEW: ROOTSTRAP: Show pretty message if URL is invalid when creating 89/20489/1
authordonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 8 May 2014 06:54:29 +0000 (15:54 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Thu, 8 May 2014 06:54:29 +0000 (15:54 +0900)
rootstrap.

User insert snapshot URL when create rootstrap. IDE has shown rare
exception message if the URL is invalid. Now, IDE shows pretty message.

Change-Id: Ieae79a454aa582fe05f007dd1d0ac2930776be59
Signed-off-by: donghyuk.yang <donghyuk.yang@samsung.com>
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RemoteRepoTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RootstrapUIMessages.properties

index 10612cc..871b752 100644 (file)
@@ -29,6 +29,7 @@ package org.tizen.nativeplatform.views.ui;
 
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.ResourceBundle;
@@ -226,7 +227,7 @@ public class RemoteRepoTab implements IRepositoryTab {
                                     public void run() {
                                         DialogUtil.openErrorDialog(resources
                                                 .getString("GenRootDlg.Error.Snapshot.Failed")
-                                                + "(" + e.toString() + ")");
+                                                + "(" + e.getMessage() + ")");
                                     }
                                 });
                             }
@@ -234,11 +235,11 @@ public class RemoteRepoTab implements IRepositoryTab {
                     });
                 } catch (InvocationTargetException e1) {
                     e1.printStackTrace();
-                    DialogUtil.openErrorDialog(e.toString());
+                    DialogUtil.openErrorDialog(e1.toString());
                     return;
                 } catch (InterruptedException e1) {
                     e1.printStackTrace();
-                    DialogUtil.openErrorDialog(e.toString());
+                    DialogUtil.openErrorDialog(e1.toString());
                     return;
                 }
 
index 8f8acd7..2d10a1e 100644 (file)
@@ -51,7 +51,7 @@ GenRootDlg.Info.Create.Meta.Rootstrap = Rootstrap meta only is created if the "G
 GenRootDlg.Error.Fail.Generate = Failed to generate rootstrap!
 GenRootDlg.Error.Empty.Snapshot = Snapshot URL is empty
 GenRootDlg.Error.Empty.Rootstrap = Rootstrap is empty
-GenRootDlg.Error.Snapshot.Failed = Getting snapshot information failed!\n
+GenRootDlg.Error.Snapshot.Failed = Failed to get snapshot information!\n
 GenRootDlg.Error.Gen.Rootstrap.Failed = Generating rootstrap failed!!\n
 GenRootDlg.Error.NoAnyRepos = You need to set repositories. Input snapshot URL and click the "Search" button.
 GenRootDlg.Error.Incorrect.Info = Failed to validate information for generating rootstrap.