Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #502 from ripienaar/495.1
Browse files Browse the repository at this point in the history
(#495) ensure errors raised will be noticed by Puppet
  • Loading branch information
ripienaar committed May 21, 2018
2 parents 078a093 + 5c3d6ef commit 6f5a4af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/mcollective/util/playbook/data_stores/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def from_hash(properties)
# @param key [String] the lock name
# @raise [StandardError] when releaging fails
def release(key)
raise(NotImplementedError, "release not implemented in %s" % [self.class], caller)
raise(StandardError, "release not implemented in %s" % [self.class], caller)
end

# Locks a specific lock in the store
Expand All @@ -54,7 +54,7 @@ def release(key)
# @param timeout [Integer,Float] how long to attempt to get the lock for
# @raise [StandardError] when locking fails
def lock(key, timeout)
raise(NotImplementedError, "lock not implemented in %s" % [self.class], caller)
raise(StandardError, "lock not implemented in %s" % [self.class], caller)
end

# Finds the members in a service
Expand All @@ -63,7 +63,7 @@ def lock(key, timeout)
# @return [Array<String>] list of service members
# @raise [StandardError] when the service is unknown or general error happened
def members(key)
raise(NotImplementedError, "members not implemented in %s" % [self.class], caller)
raise(StandardError, "members not implemented in %s" % [self.class], caller)
end

# Deletes a key from a data store
Expand All @@ -72,7 +72,7 @@ def members(key)
# @param key [String] the key to delete
# @raise [StandardError] when deleting fails
def delete(key)
raise(NotImplementedError, "delete not implemented in %s" % [self.class], caller)
raise(StandardError, "delete not implemented in %s" % [self.class], caller)
end

# Writes a value to the key in a data store
Expand All @@ -81,7 +81,7 @@ def delete(key)
# @param value [String] the value to write
# @raise [StandardError] when writing fails
def write(key, value)
raise(NotImplementedError, "write not implemented in %s" % [self.class], caller)
raise(StandardError, "write not implemented in %s" % [self.class], caller)
end

# Reads a key from a data store
Expand All @@ -90,7 +90,7 @@ def write(key, value)
# @return [String] string found in the data store
# @raise [StandardError] when the key does not exist
def read(key)
raise(NotImplementedError, "read not implemented in %s" % [self.class], caller)
raise(StandardError, "read not implemented in %s" % [self.class], caller)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/mcollective/util/playbook/tasks/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def run_task(result)
end

def run
raise(NotImplementedError, "run not implemented", caller)
raise(StandardError, "run not implemented", caller)
end

def validate_configuration!
raise(NotImplementedError, "validate_configuration! not implemented", caller)
raise(StandardError, "validate_configuration! not implemented", caller)
end

def from_hash(properties)
raise(NotImplementedError, "from_hash not implemented", caller)
raise(StandardError, "from_hash not implemented", caller)
end
end
end
Expand Down

0 comments on commit 6f5a4af

Please sign in to comment.