From e303a7bcdb5ce6c7afb368d329fbbba8088328f6 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 16:59:28 +0200 Subject: 2.1 --- library/globalFunctions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'library/globalFunctions.cpp') diff --git a/library/globalFunctions.cpp b/library/globalFunctions.cpp index 33932d67..2f5efab7 100644 --- a/library/globalFunctions.cpp +++ b/library/globalFunctions.cpp @@ -49,7 +49,8 @@ int globalFunctions::wxStringToInt(const wxString& number) if (number.ToLong(&result)) return result; else - throw RuntimeException(wxString(_("Conversion error:")) + wxT(" wxString -> long")); + return 0; //don't throw exceptions here: wxEmptyString shall be interpreted as 0 + //throw RuntimeException(wxString(_("Conversion error:")) + wxT(" wxString -> long")); } @@ -59,7 +60,8 @@ double globalFunctions::wxStringToDouble(const wxString& number) if (number.ToDouble(&result)) return result; else - throw RuntimeException(wxString(_("Conversion error:")) + wxT(" wxString -> double")); + return 0; //don't throw exceptions here: wxEmptyString shall be interpreted as 0 + //throw RuntimeException(wxString(_("Conversion error:")) + wxT(" wxString -> double")); } -- cgit