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.



864
865
866
867
# File 'lib/csv.rb', line 864

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.



863
864
865
# File 'lib/csv.rb', line 863

def encoding
  @encoding
end