Sha256: 9a23e2507f4e8a9f4c1fe37aa3eb1208cf19a4f78ab7447aa215f9dbdea58add

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

<%
error = error.is_a?(Lookbook::Error) ? error : Lookbook::Error.new(error)
@title = error.title
disable_header ||= false
%>
<%= component "header" unless disable_header %>
<div class="h-full w-full bg-red-50 flex flex-col border-red-300">
  <header class="flex-none px-8 py-8">
    <h2 class="text-xl font-bold text-red-700"><%= error.title %></h2>
  </header>

  <div class="flex-none px-8 py-6 border-t border-b border-red-200 bg-red-100 text-base font-mono leading-relaxed">
    <% if error.file_name %>
    <div class="mb-2 text-gray-500">
      <%= error.file_name %><%= ":#{error.line_number}" if error.line_number %>
    </div>
    <% end %>
    <pre class="whitespace-pre-wrap"><%= error.message %></pre>
  </div>

  <h3 class="font-bold mt-6 mb-4 px-8 flex-none">Full stack trace</h3>
  <div class="text-xs font-mono flex-grow h-full overflow-hidden">
    <div class="h-full  overflow-auto px-8 pb-10 text-gray-400">
      <% error.backtrace.each do |line| %>
        <div class="py-1 hover:text-gray-900 transition-colors duration-100">
          <%= line %>
        </div>
      <% end %>
    </div>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lookbook-0.7.2.beta.0 app/views/lookbook/error.html.erb