Louis-Philippe Véronneau pushed to branch bts_1110969 at lintian / lintian
Commits:
11e3c632 by Louis-Philippe Véronneau at 2025-09-03T00:16:11-04:00
use try-catch again instead of eval, not to fail silently
- - - - -
1 changed file:
- lib/Lintian/Check/Fonts/Postscript/Type1.pm
Changes:
=====================================
lib/Lintian/Check/Fonts/Postscript/Type1.pm
=====================================
@@ -50,6 +50,7 @@ sub visit_installed_files {
my @command = ('t1disasm', $item->unpacked_path);
my $bytes = safe_qx(@command);
+ my $enc_warning = 'In file ' . $item->name . $COLON . $SPACE;
my $output;
try {
@@ -58,12 +59,14 @@ sub visit_installed_files {
} catch ($e) {
if ($e =~ m{^cp1252 "\\x81" does not map to Unicode at .+}) {
- eval {
+ try {
# sometimes, the file is utf8
$output = decode('utf8', $bytes, Encode::FB_CROAK);
+ } catch {
+ die $enc_warning . $@;
}
} else {
- die 'In file ' . $item->name . $COLON . $SPACE . $@;
+ die $enc_warning . $@;
}
}
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/11e3c6326a24779bc6b27c0097000331c704e312
--
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/11e3c6326a24779bc6b27c0097000331c704e312
You're receiving this email because of your account on salsa.debian.org.