service_caller 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/service_error.rb +4 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 896553b4a72369a84c19158709621c7de9e4b036d5a41c40f807126cc7f49623
4
- data.tar.gz: 32a19a020177588c70c60285c578ddff96db8bf1d99fff370a21c681748c66f7
3
+ metadata.gz: a82a014594816863e1bfcc5595241ad98f46088584d3491b014b1a64c70a42c2
4
+ data.tar.gz: 4c436447096e5d4eda6be6e3dc445cf9857686d57eab9a471a9c352de58db1c3
5
5
  SHA512:
6
- metadata.gz: 13831679ecbdfa6bca20d00507e3bc65c864485b33396d8c760573db92dc9dcb287d1c6f7f82ec3002f7e90fd5f1c6d3df3d8ba99b92284486d73e4156dd1f70
7
- data.tar.gz: 43a8abead5e84381404b656081eb4c4ff128c07d5bbace951f9055d453518aeac3a579f4d7d4e1081d522f7eb796551601d63bb909d223c9b9726bd97a4ab53f
6
+ metadata.gz: 6bfda486178406cbb5d2a3f69a9c918d1b3726f5dec1ee635fccf3e1d4229bf24a2998f210a824edfe499999cd8c30454cbbe73dc731c215894bac7fca7c9d37
7
+ data.tar.gz: 14808d05d2f90a70502d4c0f2978fc5e626a04942c23ee2f8a55caaea9ab33e2aafea7a607096f0bb7dcbb98868bc27dd4747a76e99e8897c177ce4e41ffb37b
data/lib/service_error.rb CHANGED
@@ -3,8 +3,10 @@ class ServiceError < StandardError
3
3
  attr_reader :error_obj
4
4
 
5
5
  class << self
6
- def generate_from_exception(exception)
7
- service_err = new(:internal_error, error_msg: "#{exception.class.name}: #{exception.message}")
6
+ def generate_from_exception(exception, append_info={})
7
+ error_obj = {error_msg: "#{exception.class.name}: #{exception.message}"}
8
+ error_obj.merge!(append_info)
9
+ service_err = new(:internal_error, error_obj)
8
10
  service_err.set_backtrace(exception.backtrace)
9
11
  service_err
10
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_caller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-11-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: basic implement of service object
14
14
  email: laura34963@kdanmobile.com