diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-04-26 02:05:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:35 -0500 |
commit | 0d1c529cdcd4a2c808e16f7b1189fa0bfe799d89 (patch) | |
tree | 325687cff735dcf118556b72c9bb0ed660227a9e | |
parent | 6ee381d86c4a1118f14e8459999101512b6b3005 (diff) | |
download | samba-0d1c529cdcd4a2c808e16f7b1189fa0bfe799d89.tar.gz samba-0d1c529cdcd4a2c808e16f7b1189fa0bfe799d89.tar.bz2 samba-0d1c529cdcd4a2c808e16f7b1189fa0bfe799d89.zip |
r363: nicer error handling in pidl
(This used to be commit cafc8a5e763834a26432c467abfe84f140bb7d80)
-rwxr-xr-x | source4/build/pidl/pidl.pl | 3 | ||||
-rw-r--r-- | source4/build/pidl/util.pm | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index c43d042b57..b390ba7728 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -124,8 +124,9 @@ sub process_file($) } } else { $pidl = util::LoadStructure($pidl_file); + defined $pidl || die "Failed to load $pidl_file - maybe you need --parse\n"; } - + if ($opt_dump) { print IdlDump::Dump($pidl); } diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index 2a4c0de74d..d09347f22d 100644 --- a/source4/build/pidl/util.pm +++ b/source4/build/pidl/util.pm @@ -10,6 +10,7 @@ sub LoadStructure($) { my $f = shift; my $contents = FileLoad($f); + defined $contents || return undef; return eval "$contents"; } |