Sha256: b798467cefd085be56da297dd11f8d507a586d5b2cb01d8f78c375bebceb340a

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

module Aggro
  module NanomsgTransport
    # Public: An error calling the nanomsg API.
    class SocketError < RuntimeError
      attr_reader :errno

      def initialize(errno)
        @errno = errno
      end

      def error_message
        NNCore::LibNanomsg.nn_strerror(errno)
      end

      def to_s
        "Last nanomsg API call failed with '#{error_message}'"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aggro-0.0.3 lib/aggro/nanomsg_transport/socket_error.rb
aggro-0.0.2 lib/aggro/nanomsg_transport/socket_error.rb