public void GetSomeWork_Process(int seqid, TProtocol iprot, TProtocol oprot) { GetSomeWork_args args = new GetSomeWork_args(); args.Read(iprot); iprot.ReadMessageEnd(); GetSomeWork_result result = new GetSomeWork_result(); try { try { result.Success = iface_.GetSomeWork(args.BakerID); } catch (EPizzeria error) { result.Error = error; } oprot.WriteMessageBegin(new TMessage("GetSomeWork", TMessageType.Reply, seqid)); result.Write(oprot); } catch (TTransportException) { throw; } catch (Exception ex) { Console.Error.WriteLine("Error occurred in processor:"); Console.Error.WriteLine(ex.ToString()); TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error."); oprot.WriteMessageBegin(new TMessage("GetSomeWork", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }