Sha256: 7e9648296422f110f17ba753e1b907fe90ba1bf45b5d6704be0a13967e76b656

Contents?: true

Size: 812 Bytes

Versions: 15

Compression:

Stored size: 812 Bytes

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
module FatFreeCRM
  class MissingSettings < StandardError; end
  class ObsoleteSettings < StandardError; end
end

class ActionController::Base
  rescue_from FatFreeCRM::MissingSettings,  with: :render_fat_free_crm_exception
  rescue_from FatFreeCRM::ObsoleteSettings, with: :render_fat_free_crm_exception

  private

  def render_fat_free_crm_exception(exception)
    logger.error exception.inspect
    render layout: false, template: "/layouts/500", format: :html, status: 500, locals: { exception: exception }
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.15.2 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.16.4 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.14.1 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.15.1 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.16.3 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.16.2 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.16.1 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.16.0 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.15.0 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.15.0.beta.2 lib/fat_free_crm/exceptions.rb
fat_free_crm-0.15.0.beta lib/fat_free_crm/exceptions.rb
fat_free_crm-0.14.0 lib/fat_free_crm/exceptions.rb
reduced_fat_crm-0.15.0.beta lib/fat_free_crm/exceptions.rb
reduced_fat_crm-0.14.0 lib/fat_free_crm/exceptions.rb