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.
- checksums.yaml +4 -4
- data/lib/service_error.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82a014594816863e1bfcc5595241ad98f46088584d3491b014b1a64c70a42c2
|
4
|
+
data.tar.gz: 4c436447096e5d4eda6be6e3dc445cf9857686d57eab9a471a9c352de58db1c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
+
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-
|
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
|