summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/debug_lint.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-08-30 17:02:38 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-08-30 17:02:38 +0200
commit19e48b58c1b3c4b57c85071ad7a939db0db35737 (patch)
treed1cf4638de95f18070b375a7f6ca2ea047a715f5 /lib/coderay/encoders/debug_lint.rb
parent4e13ac40b21a9cb272fc7475a9976e1e0c0d8b11 (diff)
parenta31b36683834f39c1581add498cce0b016f20fb5 (diff)
downloadcoderay-19e48b58c1b3c4b57c85071ad7a939db0db35737.tar.gz
Merge branch 'master' into escape-utils
Diffstat (limited to 'lib/coderay/encoders/debug_lint.rb')
-rw-r--r--lib/coderay/encoders/debug_lint.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/coderay/encoders/debug_lint.rb b/lib/coderay/encoders/debug_lint.rb
index 2c14186..a4eba2c 100644
--- a/lib/coderay/encoders/debug_lint.rb
+++ b/lib/coderay/encoders/debug_lint.rb
@@ -18,7 +18,8 @@ module Encoders
register_for :debug_lint
def text_token text, kind
- raise Lint::EmptyToken, 'empty token' if text.empty?
+ raise Lint::EmptyToken, 'empty token for %p' % [kind] if text.empty?
+ raise Lint::UnknownTokenKind, 'unknown token kind %p (text was %p)' % [kind, text] unless TokenKinds.has_key? kind
super
end