From 5afbab65ab1eaf78356bc31ebf314acd4bdfa33b Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Tue, 28 Feb 2023 08:23:15 +0100 Subject: [PATCH] Remove unused exception captures --- main/SS/Formula/Functions/DateValue.cs | 4 ++-- main/SS/Formula/Functions/Indirect.cs | 2 +- ooxml/POIXMLDocumentPart.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/SS/Formula/Functions/DateValue.cs b/main/SS/Formula/Functions/DateValue.cs index c42548b1e..39f4cff7f 100644 --- a/main/SS/Formula/Functions/DateValue.cs +++ b/main/SS/Formula/Functions/DateValue.cs @@ -76,7 +76,7 @@ public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEva } } } - catch (FormatException e) + catch (FormatException) { return ErrorEval.VALUE_INVALID; } @@ -92,7 +92,7 @@ private int parseMonth(String monthPart) { return int.Parse(monthPart); } - catch (FormatException ignored) + catch (FormatException) { } diff --git a/main/SS/Formula/Functions/Indirect.cs b/main/SS/Formula/Functions/Indirect.cs index 66f5f060f..2657a963a 100644 --- a/main/SS/Formula/Functions/Indirect.cs +++ b/main/SS/Formula/Functions/Indirect.cs @@ -136,7 +136,7 @@ private static ValueEval EvaluateIndirect(OperationEvaluationContext ec, String { areaPtg = FormulaParser.ParseStructuredReference(refText, (IFormulaParsingWorkbook)ec.GetWorkbook(), ec.RowIndex); } - catch (FormulaParseException e) + catch (FormulaParseException) { return ErrorEval.REF_INVALID; } diff --git a/ooxml/POIXMLDocumentPart.cs b/ooxml/POIXMLDocumentPart.cs index a69cbafea..ec2429839 100644 --- a/ooxml/POIXMLDocumentPart.cs +++ b/ooxml/POIXMLDocumentPart.cs @@ -625,7 +625,7 @@ protected RelationPart CreateRelationship(POIXMLRelation descriptor, POIXMLFacto } return new RelationPart(rel, doc); } - catch (PartAlreadyExistsException pae) + catch (PartAlreadyExistsException) { // Return the specific exception so the user knows // that the name is already taken