Sha256: 2a6b8437d413fc18fb48a71651788b4ed7ab04d4a14d657551ac406d785265bd

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

module AsyncCable
  module Errors
    class Error < StandardError
      def code
        1999
      end
    end

    class StreamNameNotSet < Error
      def initialize(class_name)
        super("#stream_for must be called with stream name in #{class_name}#on_open")
      end
    end

    class UnauthorizedError < Error
      def initialize(reason = nil)
        super(reason || 'unauthorized')
      end

      def code
        1401
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
async_cable-0.2.0 lib/async_cable/errors.rb
async_cable-0.1.0 lib/async_cable/errors.rb