mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Make pryrc load errors more useful.
This commit is contained in:
parent
955580e2db
commit
f2168f1793
2 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ class Pry
|
||||||
begin
|
begin
|
||||||
toplevel_binding.eval(File.read(full_name), full_name) if File.exists?(full_name)
|
toplevel_binding.eval(File.read(full_name), full_name) if File.exists?(full_name)
|
||||||
rescue RescuableException => e
|
rescue RescuableException => e
|
||||||
puts "Error loading #{file_name}: #{e}"
|
puts "Error loading #{file_name}: #{e}\n#{e.backtrace.first}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ describe Pry do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should output an error" do
|
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"
|
"Error loading spec/fixtures/testrcbad: messin with ya"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue