public void MealPrepared_Process(int seqid, TProtocol iprot, TProtocol oprot) { MealPrepared_args args = new MealPrepared_args(); args.Read(iprot); iprot.ReadMessageEnd(); MealPrepared_result result = new MealPrepared_result(); try { try { iface_.MealPrepared(args.OrderID, args.DishID, args.Quantity, args.BakerID); } catch (EPizzeria error) { result.Error = error; } oprot.WriteMessageBegin(new TMessage("MealPrepared", 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("MealPrepared", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }