fastbeans 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 2e845b2e1f59e04f20ebadb5bcd7df6886b379fa
4
- data.tar.gz: f1669dc4f582d2ba094072194f0650ef7d009f18
3
+ metadata.gz: 352fefab7b00565d7bd0cf6ca138925911924880
4
+ data.tar.gz: 5c66a8f395881323142249c9f372b39093f44940
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: 38bc47cc4ea57c63a548b6203bf36afc2e8bcc75da94880d60761f09a3c6a9d200809d19a0221009a718ea66025c4a7963742efeec8badd1f19d0f26f09f153a
7
- data.tar.gz: 3ef8374f2ddf27520bad11c78ec71d5abc1c962cb9ca6d138d1b8d65fded614261d1fd2f286fa8fbac0c28a63c9f76cd265c1a1efdd4274956c297157445a9a1
6
+ metadata.gz: d51013f2cc2bf8530a491d1501e7fb4904b037f706e8335e60aebb4cba4f20a1b6194cdfd71283e42c00770a1027960d738d91b386b9731d012b79d99f7ef4cc
7
+ data.tar.gz: c76cab29d559fc7592fad04ef845fdd9d9221feef7d00af8c07b5a18d52e757c5f4aa8c1131b8b6d7d52182a5c8f2c6d4cfee922b119296f6342be5c8e90321a
@@ -2,6 +2,23 @@ module Fastbeans
2
2
 
3
3
  class RPCException < StandardError
4
4
  attr_accessor :orig_exc
5
+
6
+ def initialize(msg, backtrace=nil)
7
+ super(msg)
8
+ @backtrace = backtrace
9
+ end
10
+
11
+ def backtrace
12
+ if @backtrace
13
+ if @backtrace.is_a?(String)
14
+ @backtrace.split(/\n/).map(&:strip)
15
+ else
16
+ @backtrace
17
+ end
18
+ else
19
+ super
20
+ end
21
+ end
5
22
  end
6
23
 
7
24
  class RemoteCallFailed < Fastbeans::RPCException; end
@@ -32,7 +32,9 @@ module Fastbeans
32
32
 
33
33
  def to_exception
34
34
  name = camelize(underscore(@raw_response["fastbeans-error"]))
35
- Fastbeans.exception(name).new(@raw_response["error-information"])
35
+ error = @raw_response["error-information"]
36
+
37
+ Fastbeans.exception(name).new("%s. Call: %s" % [error["message"], error["call"]], error["backtrace"])
36
38
  end
37
39
 
38
40
  def camelize(term, uppercase_first_letter = true)
@@ -1,3 +1,3 @@
1
1
  module Fastbeans
2
- VERSION = "0.3.9"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastbeans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Sabanin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-20 00:00:00.000000000 Z
11
+ date: 2015-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack