Exception: CSV::InvalidEncodingError
- Inherits:
-
MalformedCSVError
- Object
- RuntimeError
- MalformedCSVError
- CSV::InvalidEncodingError
- Defined in:
- lib/csv.rb
Overview
The error thrown when the parser encounters invalid encoding in CSV.
Instance Attribute Summary collapse
-
#encoding ⇒ Object
readonly
Returns the value of attribute encoding.
Attributes inherited from MalformedCSVError
Instance Method Summary collapse
-
#initialize(encoding, line_number) ⇒ InvalidEncodingError
constructor
A new instance of InvalidEncodingError.
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
#encoding ⇒ Object (readonly)
Returns the value of attribute encoding.
851 852 853 |
# File 'lib/csv.rb', line 851 def encoding @encoding end |