Exception: Operaton::Bpm::Client::RestException
- Inherits:
-
ExternalTaskClientException
- Object
- StandardError
- ExternalTaskClientException
- Operaton::Bpm::Client::RestException
- Defined in:
- lib/operaton/bpm/client/exceptions.rb
Overview
Mirrors org.operaton.bpm.client.exception.RestException
Direct Known Subclasses
BadRequestException, EngineException, NotFoundException, UnknownHttpErrorException
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
- #http_status_code ⇒ Object
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(message, type_or_cause = nil, code = nil) ⇒ RestException
constructor
A new instance of RestException.
Methods inherited from ExternalTaskClientException
Constructor Details
#initialize(message, type_or_cause = nil, code = nil) ⇒ RestException
Returns a new instance of RestException.
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/operaton/bpm/client/exceptions.rb', line 24 def initialize(, type_or_cause = nil, code = nil) if type_or_cause.is_a?(::Exception) super(, type_or_cause) @type = nil @code = nil else super() @type = type_or_cause @code = code end @http_status_code = nil end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
22 23 24 |
# File 'lib/operaton/bpm/client/exceptions.rb', line 22 def code @code end |
#http_status_code ⇒ Object
37 38 39 |
# File 'lib/operaton/bpm/client/exceptions.rb', line 37 def http_status_code cause.is_a?(RestException) ? cause.http_status_code : @http_status_code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
22 23 24 |
# File 'lib/operaton/bpm/client/exceptions.rb', line 22 def type @type end |