Print proper error if include file can't be found.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 6 Oct 2008 02:54:48 +0000 (04:54 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 8 Oct 2008 00:18:59 +0000 (02:18 +0200)
pidl/lib/Parse/Pidl/ODL.pm

index ad8c76f62263634ca92836551fee72488e939629..c49cdfb795cac9139dd3cfbf548a70d4f18a5ceb 100644 (file)
@@ -57,6 +57,10 @@ sub ODL2IDL
                if ($x->{TYPE} eq "IMPORT") {
                        foreach my $idl_file (@{$x->{PATHS}}) {
                                $idl_file = unmake_str($idl_file);
+                               unless (-f "$basedir/$idl_file") {
+                                       error($x, "Unable to open include file `$idl_file'");
+                                       next;
+                               }
                                my $podl = Parse::Pidl::IDL::parse_file("$basedir/$idl_file", $opt_incdirs);
                                if (defined(@$podl)) {
                                        require Parse::Pidl::Typelist;