Sha256: 8750d1d84d2052dfaee87f463e4b23a7ce9510837d40507aee884f40ef0d511a
Contents?: true
Size: 771 Bytes
Versions: 46
Compression:
Stored size: 771 Bytes
Contents
module Hamlit class SyntaxError < StandardError; end class CompileError < StandardError; end module Concerns module Error # Template engine should raise Exception on runtime to # show template's error backtrace. def syntax_error(message) code = %Q{raise Hamlit::SyntaxError.new(%q{#{message}})} [:code, code] end def syntax_error!(message) raise Hamlit::SyntaxError.new(message) end def copmile_error!(message) raise CompileError.new(message) end def assert_scan!(scanner, regexp) result = scanner.scan(regexp) unless result raise CompileError.new("Expected to scan #{regexp} but got nil") end result end end end end
Version data entries
46 entries across 46 versions & 1 rubygems