-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, when code embedding fails because it's not possible for find a matching start or end line specified in a command, we got an error which looks like this:
jekyll 3.8.7 | Error: There is no line matching `Pattern satic {`.
/Users/sanders/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/bundler/gems/embed-code-eb18b3b9c6c5/lib/commands/embedding_instruction.rb:106:in `match_glob': There is no line matching `Pattern satic {`. (RuntimeError)
from /Users/sanders/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/bundler/gems/embed-code-eb18b3b9c6c5/lib/commands/embedding_instruction.rb:89:in `matching_lines'
from /Users/sanders/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/bundler/gems/embed-code-eb18b3b9c6c5/lib/commands/embedding_instruction.rb:80:in `content'
from /Users/sanders/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/bundler/gems/embed-code-eb18b3b9c6c5/lib/commands/embedding.rb:254:in `render_sample'
...
The cause of the error is that I made a mistake in the word static. But information provided in the error message is not enough for quickly finding a problematic command.
As a minimum, we need to give:
- The name of the file where the error occurred.
- Line number with the error.
It would be good to have a column number where the error occurred.
Ideally, it would be good:
- display the whole command which failed;
- highlight with red color the problematic string when printing to the screen console, and point with
^when writing to a text file.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request