diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-15 08:17:13 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-15 08:17:13 +0000 |
commit | d896e42306c5c7761a14a2d88b6d2ed04401b03c (patch) | |
tree | 6689009b26dc65f6a0f8604d1ae84613cc22cb3a /lib/custodian/parser.rb | |
parent | 6c78bd44932582c29ca04f826c21e3ede81dd898 (diff) |
Throw an exception if we attempt to redefine a macro.
Diffstat (limited to 'lib/custodian/parser.rb')
-rwxr-xr-x | lib/custodian/parser.rb | 4 |
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 |