summaryrefslogtreecommitdiff
path: root/lib/custodian
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-14 08:27:59 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-14 08:27:59 +0000
commitde174ebae39e503a4f22cae0bda20b27596701d4 (patch)
treebea89cf37539f3fc22d6f8659bb2ceb159241991 /lib/custodian
parent71cf403f61e1bc408583e69ee7059e1a9f4001df (diff)
Be more consistent about failures.
Diffstat (limited to 'lib/custodian')
-rwxr-xr-xlib/custodian/protocol-tests/http.rb3
-rwxr-xr-xlib/custodian/protocol-tests/https.rb3
-rwxr-xr-xlib/custodian/protocol-tests/ping.rb2
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/custodian/protocol-tests/http.rb b/lib/custodian/protocol-tests/http.rb
index 3f2ec8d..67defca 100755
--- a/lib/custodian/protocol-tests/http.rb
+++ b/lib/custodian/protocol-tests/http.rb
@@ -155,9 +155,10 @@ class HTTPTest
@error = "Connection refused"
return false
rescue => ex
- raise ex
+ @error = ex
return false
end
+ @error = "Misc failure"
return false
end
diff --git a/lib/custodian/protocol-tests/https.rb b/lib/custodian/protocol-tests/https.rb
index 8b9c805..642908f 100755
--- a/lib/custodian/protocol-tests/https.rb
+++ b/lib/custodian/protocol-tests/https.rb
@@ -156,9 +156,10 @@ class HTTPSTest
@error = "Connection refused"
return false
rescue => ex
- raise ex
+ @error = ex
return false
end
+ @error = "Misc failure"
return false
end
diff --git a/lib/custodian/protocol-tests/ping.rb b/lib/custodian/protocol-tests/ping.rb
index f99de3b..fd5a4ef 100755
--- a/lib/custodian/protocol-tests/ping.rb
+++ b/lib/custodian/protocol-tests/ping.rb
@@ -73,7 +73,7 @@ class PINGTest
if ( system( "#{binary} #{host}" ) == true )
puts "PING OK" if ( @test_data['verbose'] )
- return true
+ return true
else
@error = "Ping failed. TODO: Mtr"
return false