Exception: FactPulse::Helpers::FactPulseValidationError
- Inherits:
-
FactPulseError
- Object
- StandardError
- FactPulseError
- FactPulse::Helpers::FactPulseValidationError
- Defined in:
- lib/factpulse/helpers/exceptions.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(msg, errors = []) ⇒ FactPulseValidationError
constructor
A new instance of FactPulseValidationError.
Constructor Details
#initialize(msg, errors = []) ⇒ FactPulseValidationError
Returns a new instance of FactPulseValidationError.
18 |
# File 'lib/factpulse/helpers/exceptions.rb', line 18 def initialize(msg, errors = []); @errors = errors; super(errors.empty? ? msg : "#{msg}\n\nDétails:\n#{errors.map{|e| " - #{e}"}.join("\n")}"); end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
17 18 19 |
# File 'lib/factpulse/helpers/exceptions.rb', line 17 def errors @errors end |