summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-04-16 13:04:09 +0300
committerSaku Ytti <saku@ytti.fi>2014-04-16 13:04:09 +0300
commitd756387ad436bc60563e44c866fd5831b9351723 (patch)
treefe5038f2d10b383e2beea672bd2918d840bd5262 /lib
parent20d94046e00c659d0a56596191bd56f6b6a537a9 (diff)
We rescue 'LoadError' in Manager
Let's raise OxidizedError instead for known dependencies
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/core.rb2
-rw-r--r--lib/oxidized/output/git.rb2
-rw-r--r--lib/oxidized/source/sql.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb
index 202cb94..2b5bbcf 100644
--- a/lib/oxidized/core.rb
+++ b/lib/oxidized/core.rb
@@ -20,7 +20,7 @@ module Oxidized
begin
require 'oxidized/web'
rescue LoadError
- raise LoadError, 'oxidized-web not found: sudo gem install oxidized-web'
+ raise OxidizedError, 'oxidized-web not found: sudo gem install oxidized-web'
end
@rest = API::Web.new nodes, CFG.rest
@rest.run
diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb
index 6f232cb..2b07e05 100644
--- a/lib/oxidized/output/git.rb
+++ b/lib/oxidized/output/git.rb
@@ -3,7 +3,7 @@ class Git < Output
begin
require 'grit'
rescue LoadError
- raise LoadError, 'grit not found: sudo gem install grit'
+ raise OxidizedError, 'grit not found: sudo gem install grit'
end
require 'oxidized/fix/grit' if RUBY_VERSION[0..1] == '2.'
include Grit
diff --git a/lib/oxidized/source/sql.rb b/lib/oxidized/source/sql.rb
index 9f862e5..1c4c33e 100644
--- a/lib/oxidized/source/sql.rb
+++ b/lib/oxidized/source/sql.rb
@@ -3,7 +3,7 @@ class SQL < Source
begin
require 'sequel'
rescue LoadError
- raise LoadError, 'sequel not found: sudo gem install sequel'
+ raise OxidizedError, 'sequel not found: sudo gem install sequel'
end
def initialize
@@ -30,7 +30,7 @@ class SQL < Source
begin
require 'sqlite3'
rescue LoadError
- raise LoadError, 'sqlite3 not found: sudo apt install libsqlite3-dev; sudo gem install sqlite3'
+ raise OxidizedError, 'sqlite3 not found: sudo apt install libsqlite3-dev; sudo gem install sqlite3'
end
Sequel.sqlite @cfg.file
end