File: error.html.erb

package info (click to toggle)
ruby-gaffe 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 204 kB
  • sloc: ruby: 221; makefile: 7
file content (38 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Error!</title>
    <style type="text/css">
      <%= File.read(Gaffe.root.join('app/assets/stylesheets/errors.css')).gsub("\n", ' ').gsub('  ', ' ') %>
    </style>
  </head>
  <body>
    <div id="wrap">
      <h1>Error!</h1>
      <p>This is an error page brought to you by <a href="https://github.com/mirego/gaffe">Gaffe</a>.</p>

      <div class="content">
        <hr>
        <%= yield %>
        <hr>
      </div>

      <% if Rails.env.development? || Rails.env.test? %>
        <p>Original exception (only displayed in <strong>development</strong> and <strong>test</strong> environment):</p>

<pre>
<code><%= @exception.inspect %></code>
</pre>
      <% end %>

      <p>You can overwrite this page by creating these files:</p>

<% handlers = ActionView::Template::Handlers.extensions.map(&:to_s).join(', ') %>
<pre>
<code><%= Rails.root.join('app', 'views', 'layouts', "error.html.<em title='#{handlers}'>handler</em>").to_s.html_safe %></code>
<code><%= Rails.root.join('app', 'views', 'errors', "#{@rescue_response.to_s}.html.<em title='#{handlers}'>handler</em>").to_s.html_safe %></code>
</pre>
    </div>
  </body>
</html>