Exception: CovLoupe::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cov_loupe/errors/errors.rb

Overview

Error hierarchy for cov-loupe.

All custom errors inherit from CovLoupe::Error and implement user_friendly_message for mode-appropriate display (CLI gets helpful tips, MCP gets structured text).

Hierarchy:

Error
├── ConfigurationError     — setup/config problems
├── UnknownError           — unclassified exceptions
├── FileError              — file/path problems
│     ├── FileNotFoundError
│     ├── FilePermissionError
│     ├── NotAFileError
│     └── ResultsetNotFoundError  — adds CLI-specific help tips
├── UsageError             — command-line usage mistakes
└── CoverageDataError      — coverage data problems
      ├── CorruptCoverageDataError
      ├── CoverageDataStaleError      — single-file staleness
      └── CoverageDataProjectStaleError — project-wide staleness

Base error class for all SimpleCov MCP errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, original_error = nil) ⇒ Error

Returns a new instance of Error.



30
31
32
33
# File 'lib/cov_loupe/errors/errors.rb', line 30

def initialize(message = nil, original_error = nil)
  @original_error = original_error
  super(message)
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



28
29
30
# File 'lib/cov_loupe/errors/errors.rb', line 28

def original_error
  @original_error
end

Instance Method Details

#user_friendly_messageObject



35
36
37
# File 'lib/cov_loupe/errors/errors.rb', line 35

def user_friendly_message
  message
end