changeset 5932:98ffb00297f5

Ensemble8: Fix for RT-30482 Ensemble8: no format checking for X and Y values in charts
author Alexander Kouznetsov
date Mon, 09 Dec 2013 13:45:32 -0800
parents 2883ec7be017
children bee5e52e68ae
files apps/samples/Ensemble8/src/app/java/ensemble/samplepage/XYDataVisualizer.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/apps/samples/Ensemble8/src/app/java/ensemble/samplepage/XYDataVisualizer.java	Mon Dec 09 13:36:17 2013 -0800
+++ b/apps/samples/Ensemble8/src/app/java/ensemble/samplepage/XYDataVisualizer.java	Mon Dec 09 13:45:32 2013 -0800
@@ -42,6 +42,8 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javafx.beans.WeakListener;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
@@ -151,10 +153,12 @@
                                         return (X) new Integer(string);
                                     }
                                 } catch (NumberFormatException ex) {
-                                    new IllegalArgumentException("Failed to parse " + string + " to type " + clzX, ex).printStackTrace(System.err);
+                                    Logger.getLogger(XYDataVisualizer.class.getName()).log(Level.FINE, 
+                                            "Failed to parse {0} to type {1}", new Object[]{string, clzX});
                                     return getItem();
                                 }
-                                new IllegalStateException("This valueX type is not supported: " + clzX).printStackTrace(System.err);
+                                Logger.getLogger(XYDataVisualizer.class.getName()).log(Level.FINE, 
+                                        "This valueX type is not supported: {0}", clzX);
                                 return getItem();
                             }
                         });