-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose details of HeaderMissingException as properties
- Loading branch information
Igor Volkov
committed
Mar 1, 2024
1 parent
8c8830e
commit e4dae05
Showing
3 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
19 changes: 18 additions & 1 deletion
19
src/main/java/com/poiji/exception/HeaderMissingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
package com.poiji.exception; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* Exception thrown if namedHeaderMandatory is set in the options, but a header specified in an @ExcelCellName | ||
* is missing in the sheet. | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class HeaderMissingException extends PoijiException { | ||
public HeaderMissingException(String message) { | ||
|
||
private final Set<Integer> missingExcelCellHeaders; | ||
private final Set<String> missingExcelCellNameHeaders; | ||
|
||
public HeaderMissingException(String message, Set<Integer> missingExcelCellHeaders, | ||
Set<String> missingExcelCellNameHeaders) { | ||
super(message); | ||
this.missingExcelCellHeaders = Set.copyOf(missingExcelCellHeaders); | ||
this.missingExcelCellNameHeaders = Set.copyOf(missingExcelCellNameHeaders); | ||
} | ||
|
||
public Set<Integer> getMissingExcelCellHeaders() { | ||
return missingExcelCellHeaders; | ||
} | ||
|
||
public Set<String> getMissingExcelCellNameHeaders() { | ||
return missingExcelCellNameHeaders; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters