<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/CSVReadingError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData15CSVReadingErrorO"
  },
  "title" : "CSVReadingError"
}
-->

# CSVReadingError

A CSV reading error.

```
enum CSVReadingError
```

## Topics

### Getting Error Information

[`var column: Int?`](/documentation/TabularData/CSVReadingError/column)

The index of the column that contains the error.

[`var row: Int`](/documentation/TabularData/CSVReadingError/row)

The index of the row that contains the error.

[`case badEncoding(row: Int, column: Int, cellContents: Data)`](/documentation/TabularData/CSVReadingError/badEncoding(row:column:cellContents:))

An error that indicates CSV data contains an invalid UTF-8 byte sequence.

[`case failedToParse(row: Int, column: Int, type: CSVType, cellContents: Data)`](/documentation/TabularData/CSVReadingError/failedToParse(row:column:type:cellContents:))

An error that indicates the CSV reader can’t parse data in the file.

[`case misplacedQuote(row: Int, column: Int)`](/documentation/TabularData/CSVReadingError/misplacedQuote(row:column:))

An error that indicates the CSV data contains a misplaced quote.

[`case missingColumn(columnName: String)`](/documentation/TabularData/CSVReadingError/missingColumn(columnName:))

An error that indicates the CSV is missing a required column.

[`case unsupportedEncoding(String)`](/documentation/TabularData/CSVReadingError/unsupportedEncoding(_:))

An error that indicates the CSV reader doesn’t support an encoding.

[`case wrongNumberOfColumns(row: Int, columns: Int, expected: Int)`](/documentation/TabularData/CSVReadingError/wrongNumberOfColumns(row:columns:expected:))

An error that indicates the CSV data contains a row with a mismatched number of columns.

### Enumeration Cases

[`case outOfBounds(requested: Int, actual: Int)`](/documentation/TabularData/CSVReadingError/outOfBounds(requested:actual:))

An error that indicates that the read operation requested rows beyond the end of the CSV file.

[`case unsupportedColumnType(columnIndex: Int, columnName: String, type: String)`](/documentation/TabularData/CSVReadingError/unsupportedColumnType(columnIndex:columnName:type:))

An error that indicates that a column type is not one of the types supported by CSV.

### Default Implementations

[CustomStringConvertible Implementations](/documentation/TabularData/CSVReadingError/CustomStringConvertible-Implementations)

[LocalizedError Implementations](/documentation/TabularData/CSVReadingError/LocalizedError-Implementations)

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`LocalizedError`](/documentation/Foundation/LocalizedError)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

[`Error`](/documentation/Swift/Error)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)