summaryrefslogtreecommitdiff
path: root/provider_base/lib/macros
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-27 23:30:58 -0700
committerelijah <elijah@riseup.net>2014-06-27 23:30:58 -0700
commit15ec7cbcb2b9a4c230c4b8a7f7b720c7dc047c61 (patch)
treef92a319b64090beb7ee9bcea231a1a4c816ab7dd /provider_base/lib/macros
parent787eb366d80cee7c89348e11c1befa86255bbe85 (diff)
added error() macro.
Diffstat (limited to 'provider_base/lib/macros')
-rw-r--r--provider_base/lib/macros/core.rb6
1 files changed, 5 insertions, 1 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
#