Class: CDMDEXER::TransformationErrorMessage
- Inherits:
-
Object
- Object
- CDMDEXER::TransformationErrorMessage
- Defined in:
- lib/cdmdexer/transformation_error_message.rb
Overview
Raise anything but timeout errors or other http connection errors Notify downstream in case users want to log the non-timeout errors
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#notification_klass ⇒ Object
readonly
Returns the value of attribute notification_klass.
Instance Method Summary collapse
-
#initialize(message: :MISSING_ERROR_MESSAGE, notification_klass: CDMDEXER::CdmError) ⇒ TransformationErrorMessage
constructor
A new instance of TransformationErrorMessage.
- #notify ⇒ Object
Constructor Details
#initialize(message: :MISSING_ERROR_MESSAGE, notification_klass: CDMDEXER::CdmError) ⇒ TransformationErrorMessage
Returns a new instance of TransformationErrorMessage.
6 7 8 9 10 |
# File 'lib/cdmdexer/transformation_error_message.rb', line 6 def initialize(message: :MISSING_ERROR_MESSAGE, notification_klass: CDMDEXER::CdmError) @notification_klass = notification_klass @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/cdmdexer/transformation_error_message.rb', line 5 def @message end |
#notification_klass ⇒ Object (readonly)
Returns the value of attribute notification_klass.
5 6 7 |
# File 'lib/cdmdexer/transformation_error_message.rb', line 5 def notification_klass @notification_klass end |
Instance Method Details
#notify ⇒ Object
12 13 14 15 |
# File 'lib/cdmdexer/transformation_error_message.rb', line 12 def notify notification_klass.call! raise if http_error? end |