Exception: CSV::MalformedCSVError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/csv.rb

Overview

The error thrown when the parser encounters illegal CSV formatting.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, line_number) ⇒ MalformedCSVError

Returns a new instance of MalformedCSVError.



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

def initialize(message, line_number)
  @line_number = line_number
  super("#{message} in line #{line_number}.")
end

Instance Attribute Details

#line_numberObject (readonly) Also known as: lineno

Returns the value of attribute line_number.



849
850
851
# File 'lib/csv.rb', line 849

def line_number
  @line_number
end