8063087: policytool reports error message with prefix of "java.lang.Exception"

Reviewed-by: xuelei
This commit is contained in:
Weijun Wang 2014-11-12 10:47:08 +08:00
parent 15d4deb44a
commit 9aae24502b

View File

@ -1400,7 +1400,13 @@ class ToolWindow extends JFrame {
if (t instanceof NoDisplayException) {
return;
}
displayErrorDialog(w, t.toString());
if (t.getClass() == Exception.class) {
// Exception is usually thrown inside policytool for user
// interaction error. There is no need to show the type.
displayErrorDialog(w, t.getLocalizedMessage());
} else {
displayErrorDialog(w, t.toString());
}
}
/**