diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2016-02-13 15:57:11 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2016-02-13 15:57:11 +0100 |
commit | 8d908474eff99a0a653bbc94f459537d56b83e92 (patch) | |
tree | 4b066ea50ca5f95f07782d0c58f8081c4c3ef39f /lib/coderay/encoders/lint.rb | |
parent | bf395bd14ed7f63aab84955f6768f59965e3a73e (diff) | |
parent | 0a1f500d524ff0fb5eeafef051ccbb641954a87a (diff) | |
download | coderay-cleanup-output.tar.gz |
Merge branch 'master' into cleanup-outputcleanup-output
Diffstat (limited to 'lib/coderay/encoders/lint.rb')
-rw-r--r-- | lib/coderay/encoders/lint.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/coderay/encoders/lint.rb b/lib/coderay/encoders/lint.rb index 4601e90..88c8bd1 100644 --- a/lib/coderay/encoders/lint.rb +++ b/lib/coderay/encoders/lint.rb @@ -17,10 +17,12 @@ module Encoders InvalidTokenStream = Class.new StandardError EmptyToken = Class.new InvalidTokenStream + UnknownTokenKind = Class.new InvalidTokenStream IncorrectTokenGroupNesting = Class.new InvalidTokenStream def text_token text, kind - raise EmptyToken, 'empty token' if text.empty? + raise EmptyToken, 'empty token for %p' % [kind] if text.empty? + raise UnknownTokenKind, 'unknown token kind %p (text was %p)' % [kind, text] unless TokenKinds.has_key? kind end def begin_group kind |