Exception: Px::Service::ServiceBaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/px/service/errors.rb

Overview

Any external service should have its exceptions inherit from this class so that controllers can handle them all nicely with “service is down” pages or whatnot

Direct Known Subclasses

ServiceError, ServiceRequestError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status) ⇒ ServiceBaseError

Returns a new instance of ServiceBaseError.



9
10
11
12
# File 'lib/px/service/errors.rb', line 9

def initialize(message, status)
  self.status = status
  super(message)
end

Instance Attribute Details

#statusObject

Returns the value of attribute status.



7
8
9
# File 'lib/px/service/errors.rb', line 7

def status
  @status
end