Sha256: 9292a88565d6bacc3c99786fd54c58201629345bbd5c06555a5ce82880312bc2

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

# @(#) MQMBID sn=pkoa-L150203 su=_xDgVYKvOEeS63qb0dW9cyg pn=appmsging/ruby/mqlight/lib/mqlight/exceptions.rb
#
# <copyright
# notice="lm-source-program"
# pids="5725-P60"
# years="2013,2014"
# crc="3568777996" >
# Licensed Materials - Property of IBM
#
# 5725-P60
#
# (C) Copyright IBM Corp. 2014
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with
# IBM Corp.
# </copyright>

module Mqlight
  # The operation failed because of a network error
  class NetworkError < StandardError
  end

  # The operation failed due to a security related problem
  class SecurityError < StandardError
  end

  # The operation failed because the client transitioned into stopped state
  class StoppedError < StandardError
  end

  # This exception is thrown if an operation times out
  class TimeoutError < StandardError
  end

  # Thrown if the client is already subscribed to a destination.
  class SubscribedError < StandardError
  end

  # Thrown if an operation requires the client to be subscribed to a destination
  # but the client is not currently subscribed to the destination.
  class UnsubscribedError < StandardError
  end

  # The operation failed because the client doesn't yet support the options
  # that were passed to the method
  class UnsupportedError < StandardError
  end

  #
  # The operation failed due to an internal condition.  
  class InternalError < StandardError
    attr_reader :cause

    def initialize(cause)
      if cause.is_a? String
        super(cause)
      else
        super(cause.message)
      end
      @cause = cause
    end
  end
  
  #
  # A container for any exception
  class ExceptionContainer

    attr_reader :exception

    def initialize (exception)
      @exception = exception
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mqlight-1.0.2015020300.beta-x86_64-linux lib/mqlight/exceptions.rb