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.



62
63
64
65
# File 'app/lib/katello/errors.rb', line 62

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

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



60
61
62
# File 'app/lib/katello/errors.rb', line 60

def errors
  @errors
end

Instance Method Details

#messageObject



71
72
73
74
75
76
77
# File 'app/lib/katello/errors.rb', line 71

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