-
Yusuke Endoh authored
This change incorporates to Rails a feature called error_highlight that has been available since Ruby 3.1. This allow Rails' error report screen to display the fine-grained location where an error occurred (not only a line number but also beginning and end column numbers of the code fragment). For ErrorHighlight, see https://bugs.ruby-lang.org/issues/17930 in detail. To use error_highlight, ExceptionWrapper now prefers `Exception#backtrace_locations` (since Ruby 2.1), which returns an array of `Thread::Backtrace::Location`s, instead of `Exception#backtrace`. This is because error_highlight requires `Thread::Backtrace::Location` to locate the column where an error was raised. Co-Authored-By:
John Hawthorn <john@hawthorn.email> Co-Authored-By:
Jean Boussier <jean.boussier@gmail.com>
Yusuke Endoh authoredThis change incorporates to Rails a feature called error_highlight that has been available since Ruby 3.1. This allow Rails' error report screen to display the fine-grained location where an error occurred (not only a line number but also beginning and end column numbers of the code fragment). For ErrorHighlight, see https://bugs.ruby-lang.org/issues/17930 in detail. To use error_highlight, ExceptionWrapper now prefers `Exception#backtrace_locations` (since Ruby 2.1), which returns an array of `Thread::Backtrace::Location`s, instead of `Exception#backtrace`. This is because error_highlight requires `Thread::Backtrace::Location` to locate the column where an error was raised. Co-Authored-By:
John Hawthorn <john@hawthorn.email> Co-Authored-By:
Jean Boussier <jean.boussier@gmail.com>
Loading