Make pryrc load errors more useful.
This commit is contained in:
parent
955580e2db
commit
f2168f1793
|
@ -69,7 +69,7 @@ class Pry
|
|||
begin
|
||||
toplevel_binding.eval(File.read(full_name), full_name) if File.exists?(full_name)
|
||||
rescue RescuableException => e
|
||||
puts "Error loading #{file_name}: #{e}"
|
||||
puts "Error loading #{file_name}: #{e}\n#{e.backtrace.first}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ describe Pry do
|
|||
end
|
||||
|
||||
it "should output an error" do
|
||||
@doing_it.call.should ==
|
||||
@doing_it.call.split("\n").first.should ==
|
||||
"Error loading spec/fixtures/testrcbad: messin with ya"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue