Class: Opener::Webservice::ErrorHandler
- Inherits:
-
Object
- Object
- Opener::Webservice::ErrorHandler
- Defined in:
- lib/opener/webservice/error_handler.rb
Overview
Class for handling error messages that occur when processing a document.
Instance Attribute Summary collapse
- #http ⇒ HTTPClient readonly
Instance Method Summary collapse
-
#initialize ⇒ ErrorHandler
constructor
A new instance of ErrorHandler.
- #submit(error, request_id, url) ⇒ Object
Constructor Details
#initialize ⇒ ErrorHandler
Returns a new instance of ErrorHandler.
12 13 14 |
# File 'lib/opener/webservice/error_handler.rb', line 12 def initialize @http = HTTPClient.new end |
Instance Attribute Details
#http ⇒ HTTPClient (readonly)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/opener/webservice/error_handler.rb', line 9 class ErrorHandler attr_reader :http def initialize @http = HTTPClient.new end ## # @param [StandardError] error # @param [String] request_id # @param [String] url # def submit(error, request_id, url) http.post( url, :body => {:error => error., :request_id => request_id} ) end end |
Instance Method Details
#submit(error, request_id, url) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/opener/webservice/error_handler.rb', line 21 def submit(error, request_id, url) http.post( url, :body => {:error => error., :request_id => request_id} ) end |