Exception: Builderator::Util::AwsException
- Inherits:
-
TaskException
- Object
- StandardError
- TaskException
- Builderator::Util::AwsException
- Defined in:
- lib/builderator/util/aws_exception.rb
Overview
Exception raised if a safety limit is exceeded
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Attributes inherited from TaskException
Instance Method Summary collapse
-
#initialize(task, exception) ⇒ AwsException
constructor
A new instance of AwsException.
- #message ⇒ Object
- #operation ⇒ Object
- #parameters ⇒ Object
Methods inherited from TaskException
Constructor Details
#initialize(task, exception) ⇒ AwsException
Returns a new instance of AwsException.
12 13 14 15 |
# File 'lib/builderator/util/aws_exception.rb', line 12 def initialize(task, exception) super(:fail, task, :red) @exception = exception end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
10 11 12 |
# File 'lib/builderator/util/aws_exception.rb', line 10 def exception @exception end |
Instance Method Details
#message ⇒ Object
25 26 27 28 |
# File 'lib/builderator/util/aws_exception.rb', line 25 def "An error occured performing task #{ task }. #{ operation }"\ "(#{ JSON.generate(parameters) }): #{ exception. }" end |
#operation ⇒ Object
17 18 19 |
# File 'lib/builderator/util/aws_exception.rb', line 17 def operation @exception.context.operation_name end |
#parameters ⇒ Object
21 22 23 |
# File 'lib/builderator/util/aws_exception.rb', line 21 def parameters @exception.context.params end |