Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
920959a
)
Fix error logging to actually print error and stack trace for caught errors
author
David Reiss
<dreiss@apache.org>
Wed, 11 Jun 2008 00:56:42 +0000
(
00:56
+0000)
committer
David Reiss
<dreiss@apache.org>
Wed, 11 Jun 2008 00:56:42 +0000
(
00:56
+0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666408
13f79535
-47bb-0310-9956-
ffa450edef68
lib/alterl/src/thrift_processor.erl
patch
|
blob
|
history
diff --git
a/lib/alterl/src/thrift_processor.erl
b/lib/alterl/src/thrift_processor.erl
index
8cc53c3
..
8e077b8
100644
(file)
--- a/
lib/alterl/src/thrift_processor.erl
+++ b/
lib/alterl/src/thrift_processor.erl
@@
-122,11
+122,14
@@
handle_unknown_exception(State, Function, Exception) ->
Exception}).
handle_error(#state{out_protocol = OProto}, Function, Error) ->
+ Stack = erlang:get_stacktrace(),
+ error_logger:error_msg("~p had an error: ~p~n", [Function, {Error, Stack}]),
+
Message =
case application:get_env(thrift, exceptions_include_traces) of
{ok, true} ->
lists:flatten(io_lib:format("An error occurred: ~p~n",
- [{Error,
erlang:get_stacktrace()
}]));
+ [{Error,
Stack
}]));
_ ->
"An unknown handler error occurred."
end,