Exception: SimpleCovMcp::CoverageDataStaleError

Inherits:
CoverageDataError show all
Defined in:
lib/simplecov_mcp/errors.rb

Overview

Coverage data is present but appears stale compared to source files

Instance Attribute Summary collapse

Attributes inherited from Error

#original_error

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, original_error = nil, file_path: nil, file_mtime: nil, cov_timestamp: nil, src_len: nil, cov_len: nil, resultset_path: nil) ⇒ CoverageDataStaleError

Returns a new instance of CoverageDataStaleError.



96
97
98
99
100
101
102
103
104
105
# File 'lib/simplecov_mcp/errors.rb', line 96

def initialize(message = nil, original_error = nil, file_path: nil, file_mtime: nil,
  cov_timestamp: nil, src_len: nil, cov_len: nil, resultset_path: nil)
  @file_path = file_path
  @file_mtime = file_mtime
  @cov_timestamp = cov_timestamp
  @src_len = src_len
  @cov_len = cov_len
  @resultset_path = resultset_path
  super(message || default_message, original_error)
end

Instance Attribute Details

#cov_lenObject (readonly)

Returns the value of attribute cov_len.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def cov_len
  @cov_len
end

#cov_timestampObject (readonly)

Returns the value of attribute cov_timestamp.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def cov_timestamp
  @cov_timestamp
end

#file_mtimeObject (readonly)

Returns the value of attribute file_mtime.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def file_mtime
  @file_mtime
end

#file_pathObject (readonly)

Returns the value of attribute file_path.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def file_path
  @file_path
end

#resultset_pathObject (readonly)

Returns the value of attribute resultset_path.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def resultset_path
  @resultset_path
end

#src_lenObject (readonly)

Returns the value of attribute src_len.



94
95
96
# File 'lib/simplecov_mcp/errors.rb', line 94

def src_len
  @src_len
end

Instance Method Details

#user_friendly_messageObject



107
108
109
# File 'lib/simplecov_mcp/errors.rb', line 107

def user_friendly_message
  "Coverage data stale: #{message}" + build_details
end