[thrift] squelch crash reports in Erlang R12B-0
authorChristopher Piro <cpiro@apache.org>
Wed, 19 Dec 2007 00:00:39 +0000 (00:00 +0000)
committerChristopher Piro <cpiro@apache.org>
Wed, 19 Dec 2007 00:00:39 +0000 (00:00 +0000)
Summary: there's a new format for errors in R12B-0, so don't echo a crash report if it matches the new one

Reviewed By: eletuchy

Test Plan: completely unnecessary

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665400 13f79535-47bb-0310-9956-ffa450edef68

lib/erl/src/thrift_logger.erl

index c8fb49a..c6d7074 100644 (file)
@@ -214,10 +214,19 @@ config(Item) ->
 
 print_crash_report(Report) ->
     case Report of
+        %% for R12B0
+        [[_, _, {error_info, {exit, {thrift_exception, _}, _}} | _] | _] ->
+            ok;
+        [[_, _, {error_info, {exit, {timeout, _}, _}} | _] | _]  ->
+            ok;
+
+        %% for R11B5
         [[_,_,{error_info, {thrift_exception, _}}|_] | _]  ->
             ok;
         [[_,_,{error_info, {timeout, _}}|_] | _]  ->
             ok;
+
+        %% else
         _ ->
             io:format("~~~~ crash report: ~w~n", [Report])
     end.