Exception: Operaton::Bpm::Client::RestException

Inherits:
ExternalTaskClientException show all
Defined in:
lib/operaton/bpm/client/exceptions.rb

Overview

Mirrors org.operaton.bpm.client.exception.RestException

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ExternalTaskClientException

#cause

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(message, type_or_cause = nil, code = nil)
  if type_or_cause.is_a?(::Exception)
    super(message, type_or_cause)
    @type = nil
    @code = nil
  else
    super(message)
    @type = type_or_cause
    @code = code
  end
  @http_status_code = nil
end

Instance Attribute Details

#codeObject (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_codeObject



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

#typeObject (readonly)

Returns the value of attribute type.



22
23
24
# File 'lib/operaton/bpm/client/exceptions.rb', line 22

def type
  @type
end