Sha256: 3bf702ab4b7e70af5c0efd54e388438e432d87180601a5f6dc0eff93e24fcdf9

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8
# (c) 2011 Martin Kozák (martinkozak@martinkozak.net)

require "qrpc/protocol/exception-data"

##
# General QRPC module.
#

module QRPC
    
    ##
    # Queue RPC client.
    #
    # @note Since 0.3.0, all non-system methods was moved to the 
    #   {Dispatcher} module for maximal avoiding the user API 
    #   name conflicts.
    # @since 0.2.0
    #
    
    class Client
    
        ##
        # Queue RPC client exception.
        # @since 0.2.0
        #
        
        class Exception < ::Exception
            
            ##
            # Constructor.
            # Initializes from protocol exception data object.
            #
            # @param [String] name  a exception name
            # @param [String] message  a exception message
            # @param [Array] backtrace  the backtrace array
            #
            
            def initialize(name, message, backtrace = [ ])
                message = name + ": " + message
                super(message)
                
                self.set_backtrace(backtrace)
            end
            
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qrpc-0.9.0 lib/qrpc/client/exception.rb