diff options
Diffstat (limited to 'provider_base')
-rw-r--r-- | provider_base/lib/macros/core.rb | 6 | ||||
-rw-r--r-- | provider_base/services/couchdb.rb | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/provider_base/lib/macros/core.rb b/provider_base/lib/macros/core.rb index 609111ac..2ab2e71b 100644 --- a/provider_base/lib/macros/core.rb +++ b/provider_base/lib/macros/core.rb @@ -39,10 +39,14 @@ module LeapCli if instance_eval(assertion) true else - raise AssertionFailed.new(assertion) + raise AssertionFailed.new(assertion), assertion, caller end end + def error(msg) + raise ConfigError.new(@node, msg), msg, caller + end + # # applies a JSON partial to this node # diff --git a/provider_base/services/couchdb.rb b/provider_base/services/couchdb.rb index c63e3a00..81f366e1 100644 --- a/provider_base/services/couchdb.rb +++ b/provider_base/services/couchdb.rb @@ -3,7 +3,7 @@ # unless nodes_like_me['services' => 'couchdb']['couch.master' => true].any? - #raise 'node `%s`, environment `%s`: there must be at least one node with couch.master set to `true` for this environment.' % [@node.name, @node.environment] + error('there must be at least one node with couch.master set to `true` for environment `%s`.' % @node.environment) end if couch.master |