info.fingo.spata.error

Members list

Type members

Classlikes

sealed abstract class CSVException extends Exception

Base exception reported by CSV handling methods. May be thrown, raised through fs2.Stream#raiseError or returned as Left, depending on context.

Base exception reported by CSV handling methods. May be thrown, raised through fs2.Stream#raiseError or returned as Left, depending on context.

Exception subclasses denote errors which make CSV parsing or rendering completely impossible, while Errors are typically local and mean that at least partial results should be available.

For possible error codes see concrete classes implementations.

Position is the record and line number at which error has been detected. See Position for row and line description.

col is the position (character) at given line at which the error has been detected. 0 means "before first character".

field is the name (key) of field at which error has been detected. It may be a name from header or a number (starting with 0) if no header is present.

Value parameters

cause

the root exception, if available

col

column (character) at which error occurred

field

field name at which error occurred

message

error message

messageCode

error code

position

source row (record) and line at which error occurred

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
sealed abstract class ContentError extends CSVException

Error for content-related issues, typically reported on record level.

Error for content-related issues, typically reported on record level.

Value parameters

cause

the root exception

field

field name (header key) at which error occurred

message

error message

messageCode

error code

position

source row (record) and line at which error occurred

Attributes

See also

CSVException for description of fields providing error location.

Supertypes
class CSVException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class DataError
class HeaderError
class IndexError
final class DataError extends ContentError

Error reported for CSV data problems, caused by string parsing.

Error reported for CSV data problems, caused by string parsing.

Possible messageCodes are:

  • wrongType for error caused by parsing field to specific type.

Value parameters

cause

the root exception

field

field name at which error occurred

position

source row (record) and line at which error occurred

Attributes

See also

CSVException for description of fields providing error location.

Supertypes
class ContentError
class CSVException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class FieldInfo

Field information provided in case of error.

Field information provided in case of error.

Depending and the stage of CSV processing (parsing, accessing) and the type of error, it may be available fully (with name and index), partially (with name or index) or not available at all.

Value parameters

index

optional field index

name

optional field name

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class HeaderError extends ContentError

Error reported while accessing field with incorrect header value (key).

Error reported while accessing field with incorrect header value (key).

Possible messageCodes are:

  • wrongKey for error caused by accessing field with incorrect key.

Value parameters

field

field information (header key) at which error occurred

position

source row (record) and line at which error occurred

Attributes

See also

CSVException for description of fields providing error location.

Supertypes
class ContentError
class CSVException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final class IndexError extends ContentError

Error reported while accessing field with incorrect index.

Error reported while accessing field with incorrect index.

Possible messageCodes are:

  • wrongIndex for error caused by accessing field with index out of bounds.

Value parameters

field

field information (index) at which error occurred

position

source row (record) and line at which error occurred

Attributes

See also

CSVException for description of fields providing error location.

Supertypes
class ContentError
class CSVException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final class StructureException extends CSVException

Exception reported for CSV format errors.

Exception reported for CSV format errors.

Possible messageCodes are:

  • unclosedQuotation for not enclosed quotation,
  • unescapedQuotation for not escaped quotation,
  • unmatchedQuotation for unmatched quotation (probably premature end of file),
  • fieldTooLong for values longer than provided maximum (may be caused by unmatched quotation),
  • missingHeader when header isn't found (may be empty content),
  • duplicatedHeader when two or more header names are duplicated (not unique),
  • wrongNumberOfFields when number of values doesn't match header or previous records size.

Value parameters

col

column (character) at which error occurred

errorCode

parsing error code

field

field name at which error occurred

position

source row (record) and line at which error occurred

Attributes

See also

CSVException for description of fields providing error location.

Supertypes
class CSVException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all