nobject 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nobject/local.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ee645cd58c94a293439c93007bc3f813a5e6188977464b0f40467eea00859ee
|
4
|
+
data.tar.gz: f25a35c4a1126b3147453c2bb6fc0deba23e88ef453b5666745b1f8b1fe3c0f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0e1d4284c277efb739e603d6c264b76eec546cc3390b52ce64b7ca345622509c1992448eb41ddc87adc0b6e4993b0df11343ca35f32c29e06878d0fafb5c33
|
7
|
+
data.tar.gz: 8455e457c1a38d8deb1ecbd945164daecedeef70fda57a4343cd9e6509901298b7ace5453748d469ff0ed39b9b134570478188ea06e02640b5f06b0292f757ef
|
data/lib/nobject/local.rb
CHANGED
@@ -27,7 +27,12 @@ module Nobject
|
|
27
27
|
@socket.send([msg_bytes.length].pack('Q>'), 0)
|
28
28
|
@socket.send(msg_bytes, 0)
|
29
29
|
|
30
|
-
return_size =
|
30
|
+
return_size = begin
|
31
|
+
@socket.recv(8).unpack('Q>').first
|
32
|
+
rescue Exception
|
33
|
+
raise Local::MethodFailure.new("failed to call method `#{method}' over the network")
|
34
|
+
end
|
35
|
+
|
31
36
|
return_data = Marshal.load(@socket.recv(return_size))
|
32
37
|
|
33
38
|
case return_data.first
|
@@ -51,4 +56,5 @@ module Nobject
|
|
51
56
|
|
52
57
|
class Local::UnknownReturnDataType < RuntimeError; end
|
53
58
|
class Local::InvalidMethod < RuntimeError; end
|
59
|
+
class Local::MethodFailure < RuntimeError; end
|
54
60
|
end
|