From fec61848ae594fca52311274b9b5669fac402745 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 13 Nov 2012 22:08:31 +0000 Subject: Updated comments. Simplified argument testing in the constructor --- bin/custodian-enqueue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue index 6e5627a..72ff5d3 100755 --- a/bin/custodian-enqueue +++ b/bin/custodian-enqueue @@ -32,9 +32,7 @@ require 'uri' # # TODO: # -# 1. Explicitly abort and panic on malformed lines. -# -# 2. Implement HTTP-fetching for macro-bodies. +# 1. Explicitly abort and panic on malformed lines. # # # Steve @@ -68,9 +66,8 @@ class MonitorConfig @queue = Beanstalk::Pool.new(['127.0.0.1:11300']) @file = filename - if ( @file.nil? || ( ! File.exists?( @file) ) ) - raise ArgumentError, "Missing configuration file!" - end + raise ArgumentError, "Missing configuration file!" if ( @file.nil? ) + raise ArgumentError, "File not found: #{@file}" unless ( File.exists?( @file) ) end -- cgit v1.2.1