Class: Jenkins2::ServiceUnavailableError

Inherits:
Net::HTTPError
  • Object
show all
Defined in:
lib/jenkins2/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(res) ⇒ ServiceUnavailableError

Returns a new instance of ServiceUnavailableError.



23
24
25
26
27
28
29
# File 'lib/jenkins2/errors.rb', line 23

def initialize(res)
	if res.body.nil? or res.body.empty?
		super('', res)
	else
		super(res.body.match('<h1[^>]*>\n\s+([^<]+)')[1], res)
	end
end