Exception: YogaPants::Client::ElasticSearchError
- Inherits:
-
RequestError
- Object
- RuntimeError
- RequestError
- YogaPants::Client::ElasticSearchError
- Defined in:
- lib/yoga_pants/client.rb
Instance Attribute Summary collapse
-
#elasticsearch_exception_details ⇒ Object
readonly
Returns the value of attribute elasticsearch_exception_details.
-
#elasticsearch_exception_name ⇒ Object
readonly
Returns the value of attribute elasticsearch_exception_name.
Instance Method Summary collapse
-
#initialize(elasticsearch_error_message, original_exception) ⇒ ElasticSearchError
constructor
A new instance of ElasticSearchError.
- #parse_and_set_elasticsearch_error_message(message) ⇒ Object
Constructor Details
#initialize(elasticsearch_error_message, original_exception) ⇒ ElasticSearchError
Returns a new instance of ElasticSearchError.
123 124 125 126 127 |
# File 'lib/yoga_pants/client.rb', line 123 def initialize(, original_exception) super() set_backtrace(original_exception.backtrace) () end |
Instance Attribute Details
#elasticsearch_exception_details ⇒ Object (readonly)
Returns the value of attribute elasticsearch_exception_details.
121 122 123 |
# File 'lib/yoga_pants/client.rb', line 121 def elasticsearch_exception_details @elasticsearch_exception_details end |
#elasticsearch_exception_name ⇒ Object (readonly)
Returns the value of attribute elasticsearch_exception_name.
120 121 122 |
# File 'lib/yoga_pants/client.rb', line 120 def elasticsearch_exception_name @elasticsearch_exception_name end |
Instance Method Details
#parse_and_set_elasticsearch_error_message(message) ⇒ Object
129 130 131 132 133 134 135 136 |
# File 'lib/yoga_pants/client.rb', line 129 def () if =~ /(\w+)\[(.+)\]/m @elasticsearch_exception_name = $1 @elasticsearch_exception_details = $2 else @elasticsearch_exception_name = end end |