Package tech.tablesaw.io
Class AddCellToColumnException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- tech.tablesaw.io.AddCellToColumnException
-
- All Implemented Interfaces:
Serializable
public class AddCellToColumnException extends RuntimeException
This Exception wraps another Exception thrown while adding a cell to a column.The methods of this exception allow the causing Exception, row number, column index, columnNames and line to be retrieved.
The dumpRow method allows the row in question to be printed to a a PrintStream such as System.out
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AddCellToColumnException(Exception e, int columnIndex, long rowNumber, List<String> columnNames, String[] line)
Creates a new instance of this Exception
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dumpRow(PrintStream out)
Dumps to a PrintStream the information relative to the row that caused the problemint
getColumnIndex()
Returns the index of the column that threw the ExceptionString
getColumnName()
Returns the name of the column that caused the ExceptionList<String>
getColumnNames()
Returns the column names arraylong
getRowNumber()
Returns the number of the row that caused the Exception to be thrown-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AddCellToColumnException
public AddCellToColumnException(Exception e, int columnIndex, long rowNumber, List<String> columnNames, String[] line)
Creates a new instance of this Exception- Parameters:
e
- The Exception that caused adding to failcolumnIndex
- The index of the column that threw the ExceptionrowNumber
- The number of the row that caused the Exception to be throwncolumnNames
- The column names stored as an arrayline
- The original line that caused the Exception
-
-
Method Detail
-
getColumnIndex
public int getColumnIndex()
Returns the index of the column that threw the Exception
-
getRowNumber
public long getRowNumber()
Returns the number of the row that caused the Exception to be thrown
-
getColumnName
public String getColumnName()
Returns the name of the column that caused the Exception
-
dumpRow
public void dumpRow(PrintStream out)
Dumps to a PrintStream the information relative to the row that caused the problem- Parameters:
out
- The PrintStream to output to
-
-