Skip to content

Commit

Permalink
Make pryrc load errors more useful.
Browse files Browse the repository at this point in the history
  • Loading branch information
envygeeks committed Jan 1, 2013
1 parent 955580e commit f2168f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pry/pry_class.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def self.load_file_at_toplevel(file_name)
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


Expand Down
2 changes: 1 addition & 1 deletion spec/pry_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class Hello
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
Expand Down

0 comments on commit f2168f1

Please sign in to comment.