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.



80
81
82
83
# File 'app/lib/katello/errors.rb', line 80

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

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



78
79
80
# File 'app/lib/katello/errors.rb', line 78

def errors
  @errors
end

Instance Method Details

#messageObject



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

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