lib/cms_scanner/errors/http.rb in cms_scanner-0.0.36 vs lib/cms_scanner/errors/http.rb in cms_scanner-0.0.37
- old
+ new
@@ -1,6 +1,19 @@
module CMSScanner
- class Error < RuntimeError
+ class Error < StandardError
+ end
+
+ # Target Down Error
+ class TargetDownError < Error
+ attr_reader :response
+
+ def initialize(response)
+ @response = response
+ end
+
+ def to_s
+ "The url supplied '#{response.request.url}' seems to be down (#{response.return_message})"
+ end
end
# HTTP Authentication Required Error
class HTTPAuthRequiredError < Error
# :nocov: