Exception: Crowdkit::StatusError
- Defined in:
- lib/crowdkit/error.rb
Instance Method Summary collapse
-
#initialize(status, timed_out_after = nil) ⇒ StatusError
constructor
A new instance of StatusError.
Methods inherited from UserError
Constructor Details
#initialize(status, timed_out_after = nil) ⇒ StatusError
Returns a new instance of StatusError.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/crowdkit/error.rb', line 38 def initialize(status, timed_out_after = nil) if timed_out_after reason = "timed out" = "it did not complete after #{timed_out_after} seconds" else reason = status.state == "killed" ? "was killed" : "failed" = status. end super( ( :problem => "There was a problem while processing your request in the background.", :summary => "The process #{reason} because of: #{}.", :resolution => "Try performing the operation again." ) ) end |