Exception: Katello::Errors::TemplateValidationException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, errors = []) ⇒ TemplateValidationException

Returns a new instance of TemplateValidationException.



86
87
88
89
# File 'app/lib/katello/errors.rb', line 86

def initialize(msg, errors = [])
  @errors = errors
  super(msg)
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



84
85
86
# File 'app/lib/katello/errors.rb', line 84

def errors
  @errors
end

Instance Method Details

#messageObject



91
92
93
94
95
96
97
# File 'app/lib/katello/errors.rb', line 91

def message
  if @errors.nil?
    "#{to_s}: " + _("No errors")
  else
    "#{to_s}: #{errors.join(', ')}"
  end
end