Exception: CSVPlusPlus::Error::SyntaxError
- Defined in:
- lib/csv_plus_plus/error/syntax_error.rb
Overview
An error that can be thrown for various syntax errors
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(runtime, wrapped_error: nil) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
- #to_s ⇒ String
-
#to_trace ⇒ String
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(runtime, wrapped_error: nil) ⇒ SyntaxError
Returns a new instance of SyntaxError.
10 11 12 13 14 15 |
# File 'lib/csv_plus_plus/error/syntax_error.rb', line 10 def initialize(runtime, wrapped_error: nil) @runtime = runtime @wrapped_error = wrapped_error super() end |
Instance Method Details
#to_s ⇒ String
18 19 20 |
# File 'lib/csv_plus_plus/error/syntax_error.rb', line 18 def to_s to_trace end |
#to_trace ⇒ String
Output a user-helpful string that references the runtime state
32 33 34 |
# File 'lib/csv_plus_plus/error/syntax_error.rb', line 32 def to_trace "#{}#{cell_index} #{}" end |
#to_verbose_trace ⇒ Object
Output a verbose user-helpful string that references the current runtime
23 24 25 26 27 |
# File 'lib/csv_plus_plus/error/syntax_error.rb', line 23 def to_verbose_trace warn(@wrapped_error.) if @wrapped_error warn(@wrapped_error.backtrace) if @wrapped_error to_trace end |