Exception: Aws::Errors::EventError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Aws::Errors::EventError
- Defined in:
- 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 #{event.error_code}: #{event.}"
raise event
end
end
Instance Attribute Summary collapse
- #error_code ⇒ String readonly
- #error_message ⇒ String readonly
- #event_type ⇒ Symbol readonly
Instance Method Summary collapse
-
#initialize(event_type, code, message) ⇒ EventError
constructor
A new instance of EventError.
Constructor Details
#initialize(event_type, code, message) ⇒ EventError
Returns a new instance of EventError.
121 122 123 124 125 |
# File 'lib/aws-sdk-core/errors.rb', line 121 def initialize(event_type, code, ) @event_type = event_type @error_code = code @error_message = end |
Instance Attribute Details
#error_code ⇒ String (readonly)
131 132 133 |
# File 'lib/aws-sdk-core/errors.rb', line 131 def error_code @error_code end |
#error_message ⇒ String (readonly)
134 135 136 |
# File 'lib/aws-sdk-core/errors.rb', line 134 def @error_message end |
#event_type ⇒ Symbol (readonly)
128 129 130 |
# File 'lib/aws-sdk-core/errors.rb', line 128 def event_type @event_type end |