Exception: ActiveRecordDoctor::Error::DetectorConfiguredTwice

Inherits:
ActiveRecordDoctor::Error show all
Defined in:
lib/active_record_doctor/errors.rb

Instance Attribute Summary

Attributes inherited from ActiveRecordDoctor::Error

#config_path

Instance Method Summary collapse

Methods inherited from ActiveRecordDoctor::Error

[], #user_message

Constructor Details

#initialize(detector) ⇒ DetectorConfiguredTwice

Returns a new instance of DetectorConfiguredTwice.



133
134
135
# File 'lib/active_record_doctor/errors.rb', line 133

def initialize(detector)
  super("Detector #{detector} was configured multiple times")
end

Instance Method Details

#detailsObject



137
138
139
140
141
142
143
144
145
146
147
# File 'lib/active_record_doctor/errors.rb', line 137

def details
  <<-MESSAGE
The configuration file configured the same detector more than once which is
disallowed. Detector configuration should be either:

- absent - to use the defaults
- present exactly once - to override the defaults

Please ensure the detector is configured at most once and retry.
  MESSAGE
end