module Middleman::CoreExtensions::ShowExceptions

Public Class Methods

registered(app) click to toggle source

Once registered

# File lib/middleman-core/core_extensions/show_exceptions.rb, line 11
def registered(app)
  # Whether to catch and display exceptions
  # @return [Boolean]
  app.config.define_setting :show_exceptions, true, 'Whether to catch and display exceptions'

  # When in dev
  app.configure :development do
    # Include middlemare
    use ::Rack::ShowExceptions if config[:show_exceptions]
  end
end