Exception: Reek::Errors::IncomprehensibleSourceError
- Inherits:
-
BaseError
- Object
- RuntimeError
- BaseError
- Reek::Errors::IncomprehensibleSourceError
- Defined in:
- lib/reek/errors/incomprehensible_source_error.rb
Overview
Gets raised when Reek is unable to process the source
Constant Summary collapse
- TEMPLATE =
'Source %<source>s cannot be processed by Reek.'
- LONG_TEMPLATE =
<<-MESSAGE !!! %<message>s This is most likely a Reek bug. It would be great if you could report this back to the Reek team by opening a corresponding issue at https://github.com/troessner/reek/issues. Please make sure to include the source in question, the Reek version, and this entire error message, including the original exception below. Exception message: %<exception>s Original exception: %<original>s !!! MESSAGE
Instance Method Summary collapse
-
#initialize(origin:) ⇒ IncomprehensibleSourceError
constructor
A new instance of IncomprehensibleSourceError.
- #long_message ⇒ Object
Constructor Details
#initialize(origin:) ⇒ IncomprehensibleSourceError
Returns a new instance of IncomprehensibleSourceError.
34 35 36 |
# File 'lib/reek/errors/incomprehensible_source_error.rb', line 34 def initialize(origin:) super(format(TEMPLATE, source: origin)) end |
Instance Method Details
#long_message ⇒ Object
38 39 40 41 42 43 |
# File 'lib/reek/errors/incomprehensible_source_error.rb', line 38 def format(LONG_TEMPLATE, message: , exception: cause.inspect, original: cause.backtrace.join("\n\t")) end |