You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Exception: Aws::Errors::EventError

Inherits:
RuntimeError
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/errors.rb

Overview

Error event in an event stream which has event_type :error error code and error message can be retrieved when available.

example usage:

client.stream_foo(name: 'bar') do |event| stream.on_error_event do |event| puts "Error #eventevent.error_code: #eventevent.error_message" raise event end end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_type, code, message) ⇒ EventError

Returns a new instance of EventError



109
110
111
112
113
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 109

def initialize(event_type, code, message)
  @event_type = event_type
  @error_code = code
  @error_message = message
end

Instance Attribute Details

#error_codeString (readonly)

Returns:

  • (String)


119
120
121
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 119

def error_code
  @error_code
end

#error_messageString (readonly)

Returns:

  • (String)


122
123
124
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 122

def error_message
  @error_message
end

#event_typeSymbol (readonly)

Returns:

  • (Symbol)


116
117
118
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 116

def event_type
  @event_type
end