middleman/middleman-core/lib/middleman-core/core_extensions/show_exceptions.rb
Thomas Reynolds 1aa1eedc10 docs
2012-01-14 12:18:39 -08:00

26 lines
583 B
Ruby

# Support rack/showexceptions during development
module Middleman::CoreExtensions::ShowExceptions
# Setup extension
class << self
# Once registered
def registered(app)
# Require lib
require 'rack/showexceptions'
# When in dev
app.configure :development do
# Include middlemare
if show_exceptions
use ::Middleman::CoreExtensions::ShowExceptions::Middleware
end
end
end
end
# Custom exception class
# TODO: Style this ourselves
class Middleware < ::Rack::ShowExceptions
end
end