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
115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'app/lib/katello/errors.rb', line 115 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 |