From 41911a516663fec077b4b5228fc66ddebc1aae47 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Fri, 25 Jan 2008 20:12:26 +0000 Subject: [PATCH] Thrift: Better exception handling in Ruby. Reviewed By: mcslee Test Plan: None. Revert Plan: ok Other Notes: Submitted by William Morgan. Approved by Kevin Clark. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665442 13f79535-47bb-0310-9956-ffa450edef68 --- lib/rb/lib/thrift/server/tserver.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rb/lib/thrift/server/tserver.rb b/lib/rb/lib/thrift/server/tserver.rb index 6bfc1e09..0a213c7c 100644 --- a/lib/rb/lib/thrift/server/tserver.rb +++ b/lib/rb/lib/thrift/server/tserver.rb @@ -41,10 +41,11 @@ class TSimpleServer < TServer while (true) @processor.process(prot, prot) end - rescue TTransportException => ttx + rescue TTransportException, TProtocolException => ttx print ttx,"\n" + ensure + trans.close() end - trans.close() end end -- 2.17.1