summaryrefslogtreecommitdiff
path: root/lib/custodian/parser.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-15 08:17:13 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-15 08:17:13 +0000
commit661ed3c406df3e87282814d177c851572776d712 (patch)
tree6689009b26dc65f6a0f8604d1ae84613cc22cb3a /lib/custodian/parser.rb
parent1a45ecd112d692a176b7349c30fab0690905c754 (diff)
Throw an exception if we attempt to redefine a macro.
Diffstat (limited to 'lib/custodian/parser.rb')
-rwxr-xr-xlib/custodian/parser.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/custodian/parser.rb b/lib/custodian/parser.rb
index 7ed7a51..268dd3b 100755
--- a/lib/custodian/parser.rb
+++ b/lib/custodian/parser.rb
@@ -190,6 +190,10 @@ class MonitorConfig
end
+ if ( is_macro?( name ) )
+ raise ArgumentError, "The macro #{name} is already defined"
+ end
+
@MACROS[name] = val
end