diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 686aad3b..e3fca10b 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -33,8 +33,6 @@ require 'colorator' SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll - StandardError = Class.new(::StandardError) - # internal requires autoload :Cleaner, 'jekyll/cleaner' autoload :Collection, 'jekyll/collection' diff --git a/lib/jekyll/drops/immutable_drop.rb b/lib/jekyll/drops/immutable_drop.rb index 630cbfe1..5440aa00 100644 --- a/lib/jekyll/drops/immutable_drop.rb +++ b/lib/jekyll/drops/immutable_drop.rb @@ -3,8 +3,6 @@ module Jekyll module Drops class ImmutableDrop < Liquid::Drop - IllegalDropModification = Class.new(Jekyll::StandardError) - def initialize(obj) @obj = obj end @@ -19,7 +17,7 @@ module Jekyll def []=(key, val) if respond_to? key - raise IllegalDropModification.new("Key #{key} cannot be set in the drop.") + raise DropMutationException, "Key #{key} cannot be set in the drop." else fallback_data[key] = val end diff --git a/lib/jekyll/errors.rb b/lib/jekyll/errors.rb index dc5238a0..2b0dbc0c 100644 --- a/lib/jekyll/errors.rb +++ b/lib/jekyll/errors.rb @@ -1,9 +1,8 @@ module Jekyll module Errors - class FatalException < RuntimeError - end + FatalException = Class.new(::RuntimeError) - class MissingDependencyException < FatalException - end + MissingDependencyException = Class.new(FatalException) + DropMutationException = Class.new(FatalException) end end