class_docstr: Raise an exception when the lexer generates an error token.
  
  Options accepted:
  
  `excclass` : Exception class
    The exception class to raise.
    The default is `pygments.filters.ErrorToken`.
  
  .. versionadded:: 0.8
class_docstr_tok: ["Raise","an","exception","when","the","lexer","generates","an","error","token",".","Options","accepted",":","`","excclass","`",":","Exception","class","The","exception","class","to","raise",".","The","default","is","`","pygments.filters.ErrorToken","`",".","..","versionadded",":",":","0.8"]
code: def filter(self, lexer, stream):
      for ttype, value in stream:
          if ttype is Error:
              raise self.exception(value)
          yield ttype, value
  
imports: import re
  from pygments.token import String, Comment, Keyword, Name, Error, Whitespace, string_to_tokentype
  from pygments.filter import Filter
  from pygments.util import get_list_opt, get_int_opt, get_bool_opt, get_choice_opt, ClassNotFound, OptionError, text_type, string_types
  from pygments.plugin import find_plugin_filters
label_desc: Use image node_id 2 for calling the RaiseOnErrorTokenFilter obj's underlying member method code with example usage: obj.filter(lexer, stream) without return types