]> source.dussan.org Git - poi.git/commitdiff
[bug-65846] support numbervalue function
authorPJ Fanning <fanningpj@apache.org>
Tue, 25 Jan 2022 18:47:35 +0000 (18:47 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 25 Jan 2022 18:47:35 +0000 (18:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897467 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/formula/functions/NumberValueFunction.java

index 76a203689799316c7e17601c7ac9fc48fba13a86..8dd8855ed7e8509c92b1a1953e479ce33752fa1f 100644 (file)
@@ -71,7 +71,6 @@ public final class NumberValueFunction implements FreeRefFunction {
                 groupSep = OperandResolver.coerceValueToString(v3).substring(0, 1); //If multiple characters are used in the Decimal_separator or Group_separator arguments, only the first character is used.
             }
         } catch (EvaluationException e) {
-            e.printStackTrace() ;
             return e.getErrorEval();
         }
 
@@ -107,9 +106,8 @@ public final class NumberValueFunction implements FreeRefFunction {
             result = result / Math.pow(100, countPercent); //If the Text argument ends in one or more percent signs (%), they are used in the calculation of the result.
             checkValue(result);
         } catch (EvaluationException e) {
-            e.printStackTrace() ;
             return e.getErrorEval();
-        } catch (Exception anyex) {
+        } catch (Exception e) {
             return ErrorEval.VALUE_INVALID; //If any of the arguments are not valid, NUMBERVALUE returns the #VALUE! error value.
         }