summaryrefslogtreecommitdiff
path: root/lib/common/makeexception.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/makeexception.pl.in')
-rwxr-xr-xlib/common/makeexception.pl.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/common/makeexception.pl.in b/lib/common/makeexception.pl.in
index 1564b75b..c03b8277 100755
--- a/lib/common/makeexception.pl.in
+++ b/lib/common/makeexception.pl.in
@@ -1,9 +1,11 @@
#!@PERL@
+use lib "../../infrastructure";
+use BoxPlatform;
+
# global exception list file
my $global_list = '../../ExceptionCodes.txt';
-
my @exception;
my @exception_desc;
my $class;
@@ -46,8 +48,8 @@ close EXCEPTION_DESC;
# write the code
print "Generating $class exception...\n";
-open CPP,">autogen_${class}Exception.cpp" or die "Can't open cpp file for writing";
-open H,">autogen_${class}Exception.h" or die "Can't open h file for writing";
+open CPP,">autogen_${class}Exception.cpp.new" or die "Can't open cpp file for writing";
+open H,">autogen_${class}Exception.h.new" or die "Can't open h file for writing";
# write header file
my $guardname = uc 'AUTOGEN_'.$class.'EXCEPTION_H';
@@ -200,6 +202,9 @@ __E
close H;
close CPP;
+update_if_changed("autogen_${class}Exception.cpp");
+update_if_changed("autogen_${class}Exception.h");
+
# update the global exception list
my $list_before;
my $list_after;