- All Known Implementing Classes:
AbstractCsvError
,GeneralError
,RowError
public interface CsvError
Report on an error, always including at the very least an error message. If the error can be pinpointed to a line or
cell, this information is included as well.
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the line number where the error occurred, zero-based.Returns the original error message.Returns all lines, first the message, then the content and focus line, if available.Gets the content line where the error occurred, if available.
-
Method Details
-
getPrintableLines
Returns all lines, first the message, then the content and focus line, if available. These lines are usable to print with a monospaced font, since the focus line will show in the line above where the error occurred. If lines are needed for the browser, usegetRowParts()
.- Returns:
- all lines, in printable format. Will always contain at least one line.
-
getRowParts
Gets the content line where the error occurred, if available. The line is split into RowPart entries. Every RowPart knows about itself when it must be highlighted. This method is useful for reporting on the error in another format, for example HTML or PDF, since you can control the highlighting.- Returns:
- the content line split into RowPart entries. Will be an empty list if not available.
-
getLineNumber
int getLineNumber()Returns the line number where the error occurred, zero-based. Will be -1 if not applicable.- Returns:
- line number where the error occurred
-
getMessage
-