From d896e42306c5c7761a14a2d88b6d2ed04401b03c Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 15 Nov 2012 08:17:13 +0000 Subject: Throw an exception if we attempt to redefine a macro. --- lib/custodian/parser.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 -- cgit v1.2.1