Exception: Katello::Errors::CandlepinError
- Inherits:
-
StandardError
- Object
- StandardError
- Katello::Errors::CandlepinError
- Defined in:
- app/lib/katello/errors.rb
Direct Known Subclasses
CandlepinEnvironmentGone, CandlepinPoolGone, UpstreamCandlepinError
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
97 98 99 100 101 102 103 104 |
# File 'app/lib/katello/errors.rb', line 97 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 |