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