Class: Texd::Client::CompilationError
- Inherits:
-
RenderError
- Object
- StandarError
- Error
- RenderError
- Texd::Client::CompilationError
- Defined in:
- lib/texd/client.rb
Overview
Raised if the TeX compilation process failed.
Instance Attribute Summary collapse
-
#logs ⇒ Object
readonly
TeX compiler logs.
Attributes inherited from RenderError
Instance Method Summary collapse
-
#initialize(message, details: nil, logs: nil) ⇒ CompilationError
constructor
A new instance of CompilationError.
- #write_to(io) ⇒ Object
Constructor Details
#initialize(message, details: nil, logs: nil) ⇒ CompilationError
Returns a new instance of CompilationError.
38 39 40 41 |
# File 'lib/texd/client.rb', line 38 def initialize(, details: nil, logs: nil) @logs = logs super(, details: details) end |
Instance Attribute Details
#logs ⇒ Object (readonly)
TeX compiler logs. Only available if Texd.config.error_format is “full” or “condensed”.
36 37 38 |
# File 'lib/texd/client.rb', line 36 def logs @logs end |
Instance Method Details
#write_to(io) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/texd/client.rb', line 43 def write_to(io) io << "Compilation failed: #{}\n" if details io.print "Details: " PP.pp(details, io) end if logs io << "Logs:\n" << logs else io << "Logs: not available" end end |