]> Git Server - tankstelle.git/commitdiff
corrected error message when a NumberFormatException is called in the NewStationTabCo...
authorRobin Cheney <cheneyr@eternal.ddnss.de>
Mon, 1 Dec 2025 09:11:54 +0000 (10:11 +0100)
committerRobin Cheney <cheneyr@eternal.ddnss.de>
Mon, 1 Dec 2025 09:11:54 +0000 (10:11 +0100)
src/main/java/de/diejungsvondertanke/tankstelle/controllers/NewStationTabController.java

index 097ff565e4d3edf93cc1e6d4cf8883c5bab2f285..643950121aea7f457f1195110bcd683bfea74156 100644 (file)
@@ -91,7 +91,10 @@ public class NewStationTabController {
             txtAttr.clear();
 
         } catch (Exception e) {
-            parentController.showError(e.getMessage());
+            if (e instanceof NumberFormatException)
+                parentController.showError("Invalid number");
+            else
+                parentController.showError(e.getMessage());
         }
     }
 }