Exception: Katello::Errors::CandlepinError
- Inherits:
-
StandardError
- Object
- StandardError
- Katello::Errors::CandlepinError
- Defined in:
- app/lib/katello/errors.rb
Class Method Summary collapse
-
.from_exception(exception) ⇒ Object
Return a CandlepinError with the displayMessage as the message set it.
Class Method Details
.from_exception(exception) ⇒ Object
Return a CandlepinError with the displayMessage as the message set it
91 92 93 94 95 96 97 98 |
# File 'app/lib/katello/errors.rb', line 91 def self.from_exception(exception) error_data = MultiJson.load(exception.response) if = error_data["displayMessage"] self.new().tap { |e| exception.set_backtrace(e.backtrace) } end rescue StandardError return nil end |