Exception: CSV::InvalidEncodingError

Inherits:
MalformedCSVError show all
Defined in:
lib/csv.rb

Overview

The error thrown when the parser encounters invalid encoding in CSV.

Instance Attribute Summary collapse

Attributes inherited from MalformedCSVError

#line_number

Instance Method Summary collapse

Constructor Details

#initialize(encoding, line_number) ⇒ InvalidEncodingError

Returns a new instance of InvalidEncodingError.



852
853
854
855
# File 'lib/csv.rb', line 852

def initialize(encoding, line_number)
  @encoding = encoding
  super("Invalid byte sequence in #{encoding}", line_number)
end

Instance Attribute Details

#encodingObject (readonly)

Returns the value of attribute encoding.



851
852
853
# File 'lib/csv.rb', line 851

def encoding
  @encoding
end