Sha256: 3a20a5aa63e64058aa10a3fae01066b56af94b1e89edb8506f5a7532af9fbda9

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

require 'moromi/error/config'
require 'moromi/error/default_logger'
require 'moromi/error/default_information_builder'
require 'moromi/error/engine'
require 'moromi/error/errors'
require 'moromi/error/renderer'
require 'moromi/error/rescue'

module Moromi
  module Error
    def self.configure(&block)
      yield @config ||= Config.new
    end

    def self.config
      @config
    end

    def self.default_severity_mappings
      {
        Moromi::Error::Default => Logger::Severity::DEBUG,
        ActionController::RoutingError => Logger::Severity::WARN
      }
    end

    configure do |config|
      config.debug = false
      config.logger = Moromi::Error::DefaultLogger.new
      config.severity_mappings = default_severity_mappings
      config.information_builder_klass = Moromi::Error::DefaultInformationBuilder
      config.use_exception_notifier = false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
moromi-error-0.5.0 lib/moromi/error.rb
moromi-error-0.4.0 lib/moromi/error.rb
moromi-error-0.3.0 lib/moromi/error.rb