Files: README CHANGELOG COPYING lib/camping.rb lib/camping/reloader.rb lib/camping/fastcgi.rb lib/camping/session.rb lib/camping/db.rb lib/camping/webrick.rb | classes: MissingLibrary Camping Camping::Views Camping::Session Camping::Controllers Camping::Controllers::ServerError Camping::Controllers::NotFound Camping::Helpers Camping::Base Camping::Models Camping::Models::Session Camping::FastCGI Camping::Mab Camping::Reloader Camping::H WEBrick WEBrick::CampingHandler

Class Camping::Controllers::ServerError < R()

(in files lib/camping.rb )

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

Includes

Methods

Public Instance method: get(k,m,e)

     # File lib/camping.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