org.knime.base.node.io.filereader
Class FileReaderException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.knime.base.node.io.filereader.FileReaderException
All Implemented Interfaces:
Serializable

public class FileReaderException
extends RuntimeException

The exception the FileReader (more specificaly the FileRowIterator) throws if something goes wrong. This is a runtime exception for now.

Author:
Peter Ohl, University of Konstanz
See Also:
Serialized Form

Constructor Summary
FileReaderException(String msg)
          Always provide a good user message why things go wrong.
FileReaderException(String msg, DataRow faultyRow, int lineNumber)
          Constructor for an exception that stores the last (partial) row where things went wrong.
 
Method Summary
(package private)  String getDetailedMessage()
           
(package private)  int getErrorLineNumber()
           
(package private)  DataRow getErrorRow()
           
(package private)  void setDetailsMessage(String msg)
          Sets an additional message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileReaderException

FileReaderException(String msg)
Always provide a good user message why things go wrong.

Parameters:
msg - the message to store in the exception

FileReaderException

FileReaderException(String msg,
                    DataRow faultyRow,
                    int lineNumber)
Constructor for an exception that stores the last (partial) row where things went wrong.

Parameters:
msg - the message what went wrong
faultyRow - the row as far as it got read
lineNumber - the lineNumber the error occured
Method Detail

getErrorRow

DataRow getErrorRow()
Returns:
the row that was (possibly partially!) read before things went wrong. Could be null, if not set.

getErrorLineNumber

int getErrorLineNumber()
Returns:
the line number where the error occurred in the file. Could be -1 if not set.

setDetailsMessage

void setDetailsMessage(String msg)
Sets an additional message.

Parameters:
msg - the additional message

getDetailedMessage

String getDetailedMessage()
Returns:
the previously set message, or null.


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.