Exception: Rho::RhoError

Inherits:
Exception
  • Object
show all
Defined in:
lib/framework/rho/rhoerror.rb,
lib/framework/autocomplete/Rho.rb,
lib/framework/rholang/rhoerror_de.rb,
lib/framework/rholang/rhoerror_en.rb,
lib/framework/rholang/rhoerror_es.rb,
lib/extensions/rholang/rholang/rhoerror_ru.rb

Constant Summary collapse

ERR_NONE =
0
ERR_NETWORK =
1
ERR_REMOTESERVER =
2
ERR_RUNTIME =
3
ERR_UNEXPECTEDSERVERRESPONSE =
4
ERR_DIFFDOMAINSINSYNCSRC =
5
ERR_NOSERVERRESPONSE =
6
ERR_CLIENTISNOTLOGGEDIN =
7
ERR_CUSTOMSYNCSERVER =
8
ERR_UNATHORIZED =
9
ERR_CANCELBYUSER =
10
ERR_SYNCVERSION =
11
ERR_GEOLOCATION =
12

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err_code) ⇒ RhoError

Returns a new instance of RhoError.



45
46
47
# File 'lib/framework/rho/rhoerror.rb', line 45

def initialize(err_code)
    @code = err_code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



43
44
45
# File 'lib/framework/rho/rhoerror.rb', line 43

def code
  @code
end

Class Method Details

.err_message(code) ⇒ Object



146
147
# File 'lib/framework/autocomplete/Rho.rb', line 146

def self.err_message(code)
end

Instance Method Details

#messageObject



49
50
51
# File 'lib/framework/rho/rhoerror.rb', line 49

def message
    ::Rho::RhoError.err_message(code)        
end

#unknown_client?(msg) ⇒ Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/framework/rho/rhoerror.rb', line 53

def unknown_client?(msg)
   code ==  ERR_REMOTESERVER && msg && msg.downcase == 'unknown client'
end