Permalink
Browse files

report exceptions

  • Loading branch information...
1 parent 606d2e0 commit 325b7b5f0e385c7023da7d85a2724de886e699e8 Andre Lewis committed Nov 18, 2009
Showing with 5 additions and 4 deletions.
  1. +5 −4 mongrel_cluster_monitor/mongrel_cluster_monitor.rb
@@ -1,7 +1,7 @@
class MongrelClusterMonitor < Scout::Plugin
def build_report
- mongrel_configuration_dir = option("mongrel_cluster_configuration_dir") || "/etc/mongrel_cluster/"
- mongrel_rails_command = option("mongrel_rails_command") || "mongrel_rails"
+ mongrel_configuration_dir = option(:mongrel_cluster_configuration_dir) || "/etc/mongrel_cluster/"
+ mongrel_rails_command = option(:mongrel_rails_command) || "mongrel_rails"
res={}
if !File.exist?(mongrel_configuration_dir)
error(:subject=>"mongrel_configuration_dir: #{mongrel_configuration_dir} does not exist -- check options")
@@ -34,7 +34,8 @@ def build_report
alert(:subject => "No mongrel configuration files found.")
end
end
- report(res)
-
+ report(res)
+ rescue Exception => e
+ error "Encounterd an exception. #{e}"
end
end

0 comments on commit 325b7b5

Please sign in to comment.