module Pry::Command::Edit::FileAndLineLocator
def from_exception(exception, backtrace_level)
def from_exception(exception, backtrace_level) raise CommandError, "No exception found." if exception.nil? file_name, line = exception.bt_source_location_for(backtrace_level) raise CommandError, "Exception has no associated file." if file_name.nil? if Pry.eval_path == file_name raise CommandError, "Cannot edit exceptions raised in REPL." end [file_name, line] end