mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 15:30:39 -07:00
Merged last set of changes from original SVN location
This commit is contained in:
@@ -96,7 +96,7 @@ module Liquid
|
||||
left, right = context[left], context[right]
|
||||
|
||||
|
||||
operation = self.class.operators[op] || raise(ArgumentError.new("Error in tag '#{name}' - Unknown operator #{op}"))
|
||||
operation = self.class.operators[op] || raise(ArgumentError.new("Unknown operator #{op}"))
|
||||
|
||||
if operation.respond_to?(:call)
|
||||
operation.call(self, left, right)
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
module Liquid
|
||||
|
||||
class ContextError < StandardError
|
||||
end
|
||||
|
||||
# Context keeps the variable stack and resolves variables, as well as keywords
|
||||
#
|
||||
# context['variable'] = 'testing'
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
module Liquid
|
||||
class FilterNotFound < StandardError
|
||||
end
|
||||
|
||||
class FileSystemError < StandardError
|
||||
end
|
||||
class Error < ::StandardError; end
|
||||
|
||||
class ArgumentError < Error; end
|
||||
class ContextError < Error; end
|
||||
class FilterNotFound < Error; end
|
||||
class FileSystemError < Error; end
|
||||
class StandardError < Error; end
|
||||
class SyntaxError < Error; end
|
||||
end
|
||||
@@ -24,7 +24,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def self.global_filter(filter)
|
||||
raise StandardError, "Passed filter is not a module" unless filter.is_a?(Module)
|
||||
raise ArgumentError, "Passed filter is not a module" unless filter.is_a?(Module)
|
||||
@@filters[filter.name] = filter
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user