diff --git a/lib/jekyll.rb b/lib/jekyll.rb index a90a5a0b..de6b6c69 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -32,6 +32,7 @@ require 'colorator' SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll + StandardError = Class.new(::StandardError) # internal requires autoload :Cleaner, 'jekyll/cleaner' diff --git a/lib/jekyll/drops/immutable_drop.rb b/lib/jekyll/drops/immutable_drop.rb index d7948beb..630cbfe1 100644 --- a/lib/jekyll/drops/immutable_drop.rb +++ b/lib/jekyll/drops/immutable_drop.rb @@ -3,6 +3,7 @@ module Jekyll module Drops class ImmutableDrop < Liquid::Drop + IllegalDropModification = Class.new(Jekyll::StandardError) def initialize(obj) @obj = obj @@ -18,7 +19,7 @@ module Jekyll def []=(key, val) if respond_to? key - raise ArgumentError.new("Key #{key} cannot be set in the drop.") + raise IllegalDropModification.new("Key #{key} cannot be set in the drop.") else fallback_data[key] = val end