schleyfox-ernie 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  ---
2
- :major: 2
3
- :minor: 2
4
- :patch: 0
5
- :build:
2
+ :major: 0
3
+ :minor: 0
4
+ :patch: 1
@@ -12,15 +12,19 @@ process(ActionTerm, Request) ->
12
12
  Data = bert:encode({reply, Result}),
13
13
  gen_tcp:send(Sock, Data)
14
14
  catch
15
- error:Error ->
16
- BError = list_to_binary(io_lib:format("~p", [Error])),
17
- Trace = erlang:get_stacktrace(),
18
- BTrace = lists:map(fun(X) -> list_to_binary(io_lib:format("~p", [X])) end, Trace),
19
- Data = term_to_binary({error, [user, 0, <<"RuntimeError">>, BError, BTrace]}),
20
- gen_tcp:send(Sock, Data)
15
+ exit:Error -> handle_error(Sock, Error);
16
+ error:Error -> handle_error(Sock, Error)
21
17
  end,
22
18
  ok = gen_tcp:close(Sock),
23
19
  Log = Request#request.log,
24
20
  Log2 = Log#log{tdone = erlang:now()},
25
21
  Request2 = Request#request{log = Log2},
26
- ernie_access_logger:acc(Request2).
22
+ ernie_access_logger:acc(Request2).
23
+
24
+ handle_error(Sock, Error) ->
25
+ BError = list_to_binary(io_lib:format("~p", [Error])),
26
+ Trace = erlang:get_stacktrace(),
27
+ BTrace = lists:map(fun(X) -> list_to_binary(io_lib:format("~p", [X])) end, Trace),
28
+ Data = term_to_binary({error, [user, 0, <<"RuntimeError">>, BError, BTrace]}),
29
+ gen_tcp:send(Sock, Data).
30
+
data/ernie.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{schleyfox-ernie}
8
- s.version = "2.2.2"
8
+ s.version = "2.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tom Preston-Werner"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 2
8
- - 2
9
- version: 2.2.2
8
+ - 3
9
+ version: 2.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tom Preston-Werner