Skip to content

Commit

Permalink
Merge pull request #487 from BetterErrors/feature/mention-path-in-tex…
Browse files Browse the repository at this point in the history
…t-response

Mention path in text response
  • Loading branch information
RobinDaugherty authored Oct 31, 2020
2 parents 65c562c + 931ffa0 commit 64d5be2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/better_errors/templates/text.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<%== text_heading("=", "%s at %s" % [exception_type, request_path]) %>

> <%== exception_message %>
<% if backtrace_frames.any? %>
<%== exception_message %>

> To access an interactive console with this error, point your browser to: /__better_errors

<% if backtrace_frames.any? -%>

<%== text_heading("-", "%s, line %i" % [first_frame.pretty_path, first_frame.line]) %>

Expand Down
4 changes: 2 additions & 2 deletions spec/better_errors/middleware_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ module BetterErrors

it "shows the exception as-is" do
expect(status).to eq(500)
expect(body).to match(/\n> Second Exception\n/)
expect(body).not_to match(/\n> First Exception\n/)
expect(body).to match(/\nSecond Exception\n/)
expect(body).not_to match(/\nFirst Exception\n/)
end
end

Expand Down

0 comments on commit 64d5be2

Please sign in to comment.