Make pryrc load errors more useful. #789

Merged
merged 1 commit into from Jan 1, 2013
View
@@ -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
@@ -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