From bbb17bce9d207f10772abe2c7832afd52a61c125 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sun, 13 Apr 2014 10:48:50 +0300 Subject: Subclass all errors from OxidizedError --- lib/oxidized/input/ssh.rb | 2 +- lib/oxidized/node.rb | 4 ++-- lib/oxidized/nodes.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index bd0a459..dae1d74 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -13,7 +13,7 @@ module Oxidized ], } include CLI - class NoShell < StandardError; end + class NoShell < OxidizedError; end def connect node @node = node diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 5a8eb36..0cb5cb3 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -1,7 +1,7 @@ module Oxidized require 'resolv' - class MethodNotFound < StandardError; end - class ModelNotFound < StandardError; end + class MethodNotFound < OxidizedError; end + class ModelNotFound < OxidizedError; end class Node attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt attr_accessor :last, :running, :user, :msg, :from diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index 42c18cb..c70e6fd 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -1,8 +1,8 @@ module Oxidized require 'oxidized/node' require 'ipaddr' - class Oxidized::NotSupported < StandardError; end - class Oxidized::NodeNotFound < StandardError; end + class Oxidized::NotSupported < OxidizedError; end + class Oxidized::NodeNotFound < OxidizedError; end class Nodes < Array attr_accessor :source alias :put :unshift -- cgit v1.2.1