Sha256: 6b9e014f8a989d55fe8068e0e278b2d76c69c3b792b6657df94d79fff1635b0c

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

# Require lib
require 'rack/showexceptions'

# Support rack/showexceptions during development
module Middleman
  module CoreExtensions
    module ShowExceptions
      # Setup extension
      class << self
        # Once registered
        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 middleware
            use ::Rack::ShowExceptions if config[:show_exceptions]
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-core-3.4.1 lib/middleman-core/core_extensions/show_exceptions.rb