Exception: Mihari::AnalyzerError
- Defined in:
- lib/mihari/errors.rb
Instance Attribute Summary collapse
- #cause ⇒ StandardException? readonly
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(msg, analyzer, cause: nil) ⇒ AnalyzerError
constructor
A new instance of AnalyzerError.
Constructor Details
#initialize(msg, analyzer, cause: nil) ⇒ AnalyzerError
Returns a new instance of AnalyzerError.
38 39 40 41 42 43 |
# File 'lib/mihari/errors.rb', line 38 def initialize(msg, analyzer, cause: nil) super("#{msg} (from #{analyzer})") @cause = cause set_backtrace(cause.backtrace) if cause end |
Instance Attribute Details
#cause ⇒ StandardException? (readonly)
31 32 33 |
# File 'lib/mihari/errors.rb', line 31 def cause @cause end |
Instance Method Details
#detail ⇒ Object
45 46 47 48 49 |
# File 'lib/mihari/errors.rb', line 45 def detail return nil unless cause.respond_to?(:detail) cause.detail end |