Project

General

Profile

Actions

Feature #19451

open

Extract path and line number from SyntaxError?

Added by ioquatix (Samuel Williams) about 1 year ago. Updated about 1 year ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:112503]

Description

There doesn't seem to be any official way to extract the path and line number from a syntax error.

There are two ways I can see us dong this:

  • Provide explicit path and line_number attributes.
  • Prepend them to backtrace_locations.

The nice thing about the latter approach is that it will just work with existing tools which understand how to highlight code based on backtrace locations.

Maybe we should do both?


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #19452: `Thread::Backtrace::Location` should have column information if possible.OpenActions
Actions

Also available in: Atom PDF

Like1
Like0Like0Like0Like0Like0Like0Like0Like0Like0