Class: TexLogParser::FatalErrorOccurred
- Inherits:
-
Object
- Object
- TexLogParser::FatalErrorOccurred
- Includes:
- LogParser::RegExpPattern
- Defined in:
- lib/tex_log_parser/patterns/fatal_error_occurred.rb
Overview
Matches messages of this form:
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on plain.log.
Instance Method Summary collapse
-
#initialize ⇒ FatalErrorOccurred
constructor
Creates a new instance.
-
#read(lines) ⇒ Array<(Message, Int)>
Reads a message from the given lines.
Methods included from LogParser::RegExpPattern
Methods included from LogParser::Pattern
Constructor Details
#initialize ⇒ FatalErrorOccurred
Creates a new instance.
12 13 14 15 16 |
# File 'lib/tex_log_parser/patterns/fatal_error_occurred.rb', line 12 def initialize super(/^!\s+==>/, { pattern: ->(_) { /Transcript written/ }, until: :match, inclusive: true } ) end |
Instance Method Details
#read(lines) ⇒ Array<(Message, Int)>
Reads a message from the given lines.
19 20 21 22 23 24 25 26 27 |
# File 'lib/tex_log_parser/patterns/fatal_error_occurred.rb', line 19 def read(lines) # @type [Message] msg msg, consumed = super(lines) msg.level = :error msg.preformatted = false [msg, consumed] end |