Exception: Katello::Errors::PulpError
- Inherits:
-
StandardError
- Object
- StandardError
- Katello::Errors::PulpError
- Defined in:
- app/lib/katello/errors.rb
Class Method Summary collapse
Class Method Details
.from_task(task) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'app/lib/katello/errors.rb', line 102 def self.from_task(task) if %w(error canceled).include?(task[:state]) = if task[:exception] Array(task[:exception]).join('; ') elsif task[:error] "#{task[:error][:code]}: #{task[:error][:description]}" elsif task[:state] == 'canceled' _("Task canceled") else _("Pulp task error") end self.new() end end |