Exception: RBI::UnexpectedParserError
- Defined in:
- lib/rbi/parser.rb
Instance Attribute Summary collapse
- #last_location ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(parent_exception, last_location) ⇒ UnexpectedParserError
constructor
A new instance of UnexpectedParserError.
- #print_debug(io: $stderr) ⇒ Object
Constructor Details
#initialize(parent_exception, last_location) ⇒ UnexpectedParserError
Returns a new instance of UnexpectedParserError.
23 24 25 26 27 |
# File 'lib/rbi/parser.rb', line 23 def initialize(parent_exception, last_location) super(parent_exception) set_backtrace(parent_exception.backtrace) @last_location = last_location end |
Instance Attribute Details
#last_location ⇒ Object (readonly)
20 21 22 |
# File 'lib/rbi/parser.rb', line 20 def last_location @last_location end |
Instance Method Details
#print_debug(io: $stderr) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rbi/parser.rb', line 30 def print_debug(io: $stderr) io.puts "" io.puts "##################################" io.puts "### RBI::Parser internal error ###" io.puts "##################################" io.puts "" io.puts "There was an internal parser error while processing this source." io.puts "" io.puts "Error: #{} while parsing #{last_location}:" io.puts "" io.puts last_location.source || "<no source>" io.puts "" io.puts "Please open an issue at https://github.com/Shopify/rbi/issues/new." io.puts "" io.puts "##################################" io.puts "" end |