Exception: CSVPlusPlus::Language::SyntaxError
- Inherits:
-
StandardError
- Object
- StandardError
- CSVPlusPlus::Language::SyntaxError
- Defined in:
- lib/csv_plus_plus/language/syntax_error.rb
Overview
An error that can be thrown for various syntax errors
Instance Method Summary collapse
-
#initialize(message, bad_input, runtime, wrapped_error: nil) ⇒ SyntaxError
constructor
initialize.
-
#to_s ⇒ Object
to_s.
-
#to_trace ⇒ Object
Output a user-helpful string that references the runtime state.
-
#to_verbose_trace ⇒ Object
Output a verbose user-helpful string that references the current runtime.
Constructor Details
#initialize(message, bad_input, runtime, wrapped_error: nil) ⇒ SyntaxError
initialize
9 10 11 12 13 14 15 16 |
# File 'lib/csv_plus_plus/language/syntax_error.rb', line 9 def initialize(, bad_input, runtime, wrapped_error: nil) @bad_input = bad_input.to_s @runtime = runtime @wrapped_error = wrapped_error @message = super() end |
Instance Method Details
#to_s ⇒ Object
to_s
19 20 21 |
# File 'lib/csv_plus_plus/language/syntax_error.rb', line 19 def to_s to_trace end |
#to_trace ⇒ Object
Output a user-helpful string that references the runtime state
31 32 33 |
# File 'lib/csv_plus_plus/language/syntax_error.rb', line 31 def to_trace "#{}#{cell_index} #{}" end |
#to_verbose_trace ⇒ Object
Output a verbose user-helpful string that references the current runtime
24 25 26 27 28 |
# File 'lib/csv_plus_plus/language/syntax_error.rb', line 24 def to_verbose_trace warn(@wrapped_error.) warn(@wrapped_error.backtrace) to_trace end |