Source

shlomi-fish-homepage / bin / find_ascii_quotes-xmlp.pl

Diff from to

File bin/find_ascii_quotes-xmlp.pl

 use XML::Parser;
 
 binmode STDOUT, ":encoding(utf8)";
+
 foreach my $filename (@ARGV)
 {
     my $parser = XML::Parser->new(
         },
     );
 
-    $parser->parsefile($filename);
+    eval {
+        $parser->parsefile($filename);
+    };
+
+    if (my $err = $@)
+    {
+        die "Error '$err' at filename '$filename'";
+    }
 }