Exceptions

At the bottom of your controller add:

class WhateverException < Merb::ControllerExceptions::Base
end

in app/controllers/exceptions.rb add:

def whatever_exception
  render :format => :html
end

Create a new file app/views/exceptions/whatever_exception.html.erb with the data of your exception. You may now raise WhateverException.

Edit Page | History | Version: