Class Camping::Controllers::ServerError
In: lib/camping-unabridged.rb
Parent: R()

The ServerError class is a special controller class for handling many (but not all) 500 errors. If there is a parse error in Camping or in your application‘s source code, it will not be caught by Camping. The controller class k and request method m (GET, POST, etc.) where the error took place are passed in, along with the Exception e which can be mined for useful info.

  module Camping::Controllers
    class ServerError
      def get(k,m,e)
        @status = 500
        div do
          h1 'Camping Problem!'
          h2 "in #{k}.#{m}"
          h3 "#{e.class} #{e.message}:"
          ul do
            e.backtrace.each do |bt|
              li bt
            end
          end
        end
      end
    end
  end

Methods

get  

Public Instance methods

[Source]

     # File lib/camping-unabridged.rb, line 573
573:       def get(k,m,e)
574:         r(500, Mab.new { 
575:           h1(P)
576:           h2 "#{k}.#{m}"
577:           h3 "#{e.class} #{e.message}:"
578:           ul { e.backtrace.each { |bt| li bt } }
579:         }.to_s)
580:       end

[Validate]