Permalink
Browse files

Make pryrc load errors more useful.

  • Loading branch information...
1 parent 955580e commit f2168f1793504b6d2d2c3eef9afc7cea4a0ada40 @envygeeks envygeeks committed Jan 1, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/pry/pry_class.rb
  2. +1 −1 spec/pry_spec.rb
View
2 lib/pry/pry_class.rb
@@ -69,7 +69,7 @@ def self.load_file_at_toplevel(file_name)
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
View
2 spec/pry_spec.rb
@@ -390,7 +390,7 @@ class Hello
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

0 comments on commit f2168f1

Please sign in to comment.