Method: Aws::Errors::ServiceError#initialize

Defined in:
lib/aws-sdk-core/errors.rb

#initialize(context, message, data = Aws::EmptyStructure.new) ⇒ ServiceError

Returns a new instance of ServiceError.

Parameters:



17
18
19
20
21
22
23
# File 'lib/aws-sdk-core/errors.rb', line 17

def initialize(context, message, data = Aws::EmptyStructure.new)
  @code = self.class.code
  @context = context
  @data = data
  @message = message && !message.empty? ? message : self.class.to_s
  super(@message)
end