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



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

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)


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

def error_code
  @error_code
end

#error_messageString (readonly)

Returns:

  • (String)


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

def error_message
  @error_message
end

#event_typeSymbol (readonly)

Returns:

  • (Symbol)


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

def event_type
  @event_type
end