fastbeans 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastbeans/errors.rb +1 -14
- data/lib/fastbeans/response.rb +4 -2
- data/lib/fastbeans/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1161970b4a49869f2568eb59ce8675f51091ab14
|
4
|
+
data.tar.gz: 60733d1ea8cdcca708c9e2f320ac2c0317da06cd
|
5
5
|
!binary "U0hBNTEy":
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdfeeaec66f7c81f6e32df893bf5bbbb3486da2744dea2e5ca3f3d186a44c54e251398886033b75170a54165b3adc3cd6bb4355d05213a22ea9cb466c4f92310
|
7
|
+
data.tar.gz: 474c17dc90adf4561be28d71dcb31b10274a79332a4cea862db69d019131eb365b5dc7fd7d5f7d6c322cf4cfd374991bd43c31db73c7ef3005e55c005894779f
|
data/lib/fastbeans/errors.rb
CHANGED
@@ -2,26 +2,13 @@ module Fastbeans
|
|
2
2
|
|
3
3
|
class RPCException < StandardError
|
4
4
|
attr_accessor :orig_exc
|
5
|
-
|
6
|
-
def initialize(msg, java_backtrace=nil)
|
7
|
-
super(msg)
|
8
|
-
@java_backtrace_arr = if java_backtrace.is_a?(String)
|
9
|
-
java_backtrace.split(/\n/).map(&:strip)
|
10
|
-
else
|
11
|
-
[]
|
12
|
-
end
|
13
|
-
end
|
14
5
|
end
|
15
6
|
|
16
7
|
class RemoteCallFailed < Fastbeans::RPCException; end
|
17
8
|
class RemoteException < Fastbeans::RPCException; end
|
18
9
|
class RemoteConnectionFailed < Fastbeans::RPCException; end
|
19
10
|
class RemoteConnectionDead < Fastbeans::RPCException; end
|
20
|
-
class AutogeneratedException < Fastbeans::RPCException
|
21
|
-
def backtrace
|
22
|
-
[@java_backtrace_arr, super].flatten.compact
|
23
|
-
end
|
24
|
-
end
|
11
|
+
class AutogeneratedException < Fastbeans::RPCException; end
|
25
12
|
class ResponseSignatureMismatch < RemoteConnectionFailed; end
|
26
13
|
class ResponseReadTimeout < RemoteCallFailed; end
|
27
14
|
|
data/lib/fastbeans/response.rb
CHANGED
@@ -26,7 +26,7 @@ module Fastbeans
|
|
26
26
|
unless error?
|
27
27
|
@raw_response[1]
|
28
28
|
else
|
29
|
-
|
29
|
+
raise_exception
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -34,7 +34,9 @@ module Fastbeans
|
|
34
34
|
name = camelize(underscore(@raw_response["fastbeans-error"]))
|
35
35
|
error = @raw_response["error-information"]
|
36
36
|
|
37
|
-
|
37
|
+
msg = "%s. Call: %s" % [error["message"], error["call"]]
|
38
|
+
backtrace = error["backtrace"] + caller
|
39
|
+
raise Fastbeans.exception(name), msg, backtrace
|
38
40
|
end
|
39
41
|
|
40
42
|
def camelize(term, uppercase_first_letter = true)
|
data/lib/fastbeans/version.rb
CHANGED