info.fingo.csv
Class CSVException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by info.fingo.util.EnclosingException
              extended by info.fingo.csv.CSVException
All Implemented Interfaces:
java.io.Serializable

public class CSVException
extends EnclosingException

The excpetion used while parsing or validation of CSV data. Consider use of following methods when catched:

Author:
FINGO - Robert Marek
See Also:
Serialized Form

Field Summary
static int CODE_BAD_DATA
          Error code: invalid data = 0x17
static int CODE_EMPTY_FILE
          Error code: empty file = 0x11
static int CODE_EMPTY_KEY
          Error code: empty key in header = 0x13
static int CODE_KEYS_NOT_UNIQUE
          Error code: not unique keys in header = 0x14
static int CODE_NO_KEYS
          Error code: no keys (header) found = 0x12
static int CODE_QUOTATION
          Error code: unmatched qutation = 0x16
static int CODE_VALS_NUMBER
          Error code: number of values doesn't match number of keys = 0x15
 
Fields inherited from class info.fingo.util.EnclosingException
code, nestedException
 
Constructor Summary
CSVException()
          Constructor for CSVException.
CSVException(java.lang.Exception nestedException)
          Constructor for CSVException.
CSVException(int exceptionCode)
          Constructor for CSVException.
CSVException(int exceptionCode, java.lang.Exception nestedException)
          Constructor for CSVException.
CSVException(int exceptionCode, java.lang.Exception nestedException, int line, java.lang.String fieldKey)
          Constructor for CSVException.
CSVException(java.lang.String message)
          Constructor for CSVException.
CSVException(java.lang.String message, java.lang.Exception nestedException)
          Constructor for CSVException.
CSVException(java.lang.String message, int exceptionCode)
          Constructor for CSVException.
CSVException(java.lang.String message, int exceptionCode, java.lang.Exception nestedException)
          Constructor for CSVException.
CSVException(java.lang.String message, int exceptionCode, java.lang.Exception nestedException, int line, java.lang.String fieldKey)
          Constructor for CSVException.
CSVException(java.lang.String message, int exceptionCode, int line, java.lang.String fieldKey)
          Constructor for CSVException.
 
Method Summary
 java.lang.String getFieldKey()
          Returns the field key.
 int getLine()
          Returns the line.
 
Methods inherited from class info.fingo.util.EnclosingException
fillInStackTrace, getCode, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Throwable
getCause, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CODE_EMPTY_FILE

public static final int CODE_EMPTY_FILE
Error code: empty file = 0x11

See Also:
Constant Field Values

CODE_NO_KEYS

public static final int CODE_NO_KEYS
Error code: no keys (header) found = 0x12

See Also:
Constant Field Values

CODE_EMPTY_KEY

public static final int CODE_EMPTY_KEY
Error code: empty key in header = 0x13

See Also:
Constant Field Values

CODE_KEYS_NOT_UNIQUE

public static final int CODE_KEYS_NOT_UNIQUE
Error code: not unique keys in header = 0x14

See Also:
Constant Field Values

CODE_VALS_NUMBER

public static final int CODE_VALS_NUMBER
Error code: number of values doesn't match number of keys = 0x15

See Also:
Constant Field Values

CODE_QUOTATION

public static final int CODE_QUOTATION
Error code: unmatched qutation = 0x16

See Also:
Constant Field Values

CODE_BAD_DATA

public static final int CODE_BAD_DATA
Error code: invalid data = 0x17

See Also:
Constant Field Values
Constructor Detail

CSVException

public CSVException()
Constructor for CSVException.


CSVException

public CSVException(java.lang.String message)
Constructor for CSVException.

Parameters:
message - exception message

CSVException

public CSVException(int exceptionCode)
Constructor for CSVException.

Parameters:
exceptionCode - the code

CSVException

public CSVException(java.lang.String message,
                    int exceptionCode,
                    java.lang.Exception nestedException)
Constructor for CSVException.

Parameters:
message - exception message
exceptionCode - the code
nestedException - nested exception

CSVException

public CSVException(java.lang.String message,
                    int exceptionCode,
                    java.lang.Exception nestedException,
                    int line,
                    java.lang.String fieldKey)
Constructor for CSVException.

Parameters:
message - exception message
exceptionCode - the code
nestedException - nested exception
line - line number
fieldKey - key of field (column) causing exception

CSVException

public CSVException(int exceptionCode,
                    java.lang.Exception nestedException)
Constructor for CSVException.

Parameters:
exceptionCode - the code
nestedException - nested exception

CSVException

public CSVException(int exceptionCode,
                    java.lang.Exception nestedException,
                    int line,
                    java.lang.String fieldKey)
Constructor for CSVException.

Parameters:
exceptionCode - the code
nestedException - nested exception
line - line number
fieldKey - key of field (column) causing exception

CSVException

public CSVException(java.lang.Exception nestedException)
Constructor for CSVException.

Parameters:
nestedException - nested exception

CSVException

public CSVException(java.lang.String message,
                    int exceptionCode)
Constructor for CSVException.

Parameters:
message - exception message
exceptionCode - the code

CSVException

public CSVException(java.lang.String message,
                    int exceptionCode,
                    int line,
                    java.lang.String fieldKey)
Constructor for CSVException.

Parameters:
message - exception message
exceptionCode - the code
line - line number
fieldKey - key of field (column) causing exception

CSVException

public CSVException(java.lang.String message,
                    java.lang.Exception nestedException)
Constructor for CSVException.

Parameters:
message - exception message
nestedException - nested exception
Method Detail

getFieldKey

public java.lang.String getFieldKey()
Returns the field key.

Returns:
String - the field key

getLine

public int getLine()
Returns the line.

Returns:
int - the line number