Exception: RBI::UnexpectedParserError
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/parser.rb
Instance Attribute Summary collapse
-
#last_location ⇒ Object
readonly
Returns the value of attribute last_location.
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.
27 28 29 30 31 |
# File 'lib/rbi/parser.rb', line 27 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)
Returns the value of attribute last_location.
24 25 26 |
# File 'lib/rbi/parser.rb', line 24 def last_location @last_location end |
Instance Method Details
#print_debug(io: $stderr) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/rbi/parser.rb', line 34 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 |