Class: Kitchen::Terraform::Raise::ClientError
- Inherits:
-
Object
- Object
- Kitchen::Terraform::Raise::ClientError
- Defined in:
- lib/kitchen/terraform/raise/client_error.rb
Overview
ClientError is the class of objects which handle errors that are caused by incorrect use of an API.
Instance Method Summary collapse
-
#call(message:) ⇒ void
#call logs an error message and raises an error with the message.
-
#initialize(logger:) ⇒ Kitchen::Terraform::ClientError
constructor
#initialize prepares a new instance of the class.
Constructor Details
#initialize(logger:) ⇒ Kitchen::Terraform::ClientError
#initialize prepares a new instance of the class.
39 40 41 |
# File 'lib/kitchen/terraform/raise/client_error.rb', line 39 def initialize(logger:) self.logger = logger end |
Instance Method Details
#call(message:) ⇒ void
This method returns an undefined value.
#call logs an error message and raises an error with the message.
29 30 31 32 33 |
# File 'lib/kitchen/terraform/raise/client_error.rb', line 29 def call(message:) logger.error raise ::Kitchen::ClientError, end |