File: networking_error.rb

package info (click to toggle)
ruby-aws-sdk-core 3.235.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,288 kB
  • sloc: ruby: 17,870; makefile: 4
file content (45 lines) | stat: -rw-r--r-- 990 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# frozen_string_literal: true

module Seahorse
  module Client
    class NetworkingError < StandardError

      def initialize(error, msg = nil)
        super(msg || error.message)
        set_backtrace(error.backtrace)
        @original_error = error
      end

      attr_reader :original_error

    end

    # Raised when sending initial headers and data failed
    # for event stream requests over Http2
    class Http2InitialRequestError < StandardError

      def initialize(error)
        @original_error = error
      end

      # @return [HTTP2::Error]
      attr_reader :original_error

    end

    # Raised when connection failed to initialize a new stream
    class Http2StreamInitializeError < StandardError

      def initialize(error)
        @original_error = error
      end

      # @return [HTTP2::Error]
      attr_reader :original_error

    end

    # Raised when trying to use an closed connection
    class Http2ConnectionClosedError < StandardError; end
  end
end