Sha256: e5dbe303664e7d10116d84b2c3aed91f7acd78ff3b55b47a615e58a0692ef8d9

Contents?: true

Size: 1.75 KB

Versions: 2

Compression:

Stored size: 1.75 KB

Contents

#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'debug_proto_test_types'

module ServiceForExceptionWithAMap
  class Client
    include ::Thrift::Client

    def methodThatThrowsAnException()
      send_methodThatThrowsAnException()
      recv_methodThatThrowsAnException()
    end

    def send_methodThatThrowsAnException()
      send_message('methodThatThrowsAnException', MethodThatThrowsAnException_args)
    end

    def recv_methodThatThrowsAnException()
      result = receive_message(MethodThatThrowsAnException_result)
      raise result.xwamap unless result.xwamap.nil?
      return
    end

  end

  class Processor
    include ::Thrift::Processor

    def process_methodThatThrowsAnException(seqid, iprot, oprot)
      args = read_args(iprot, MethodThatThrowsAnException_args)
      result = MethodThatThrowsAnException_result.new()
      begin
        @handler.methodThatThrowsAnException()
      rescue ExceptionWithAMap => xwamap
        result.xwamap = xwamap
      end
      write_result(result, oprot, 'methodThatThrowsAnException', seqid)
    end

  end

  # HELPER FUNCTIONS AND STRUCTURES

  class MethodThatThrowsAnException_args
    include ::Thrift::Struct, ::Thrift::Struct_Union

    FIELDS = {

    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

  class MethodThatThrowsAnException_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    XWAMAP = 1

    FIELDS = {
      XWAMAP => {:type => ::Thrift::Types::STRUCT, :name => 'xwamap', :class => ExceptionWithAMap}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
slayer-thrift-0.7.0 debug_proto_test/gen-rb/service_for_exception_with_a_map.rb
thrift-0.7.0 debug_proto_test/gen-rb/service_for_exception_with_a_map.rb