From ea75b0db2bb439acdcd1d6e00a7bb76d96044f38 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 17 Aug 2022 09:33:15 +0000 Subject: lei inspect: less scary exception for invalid "docid:" inspect It still says "Exception:", but doesn't pointlessly print out the line number and file of the exception when it's a data/input problem, and not a code problem on our end. --- lib/PublicInbox/LeiInspect.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiInspect.pm b/lib/PublicInbox/LeiInspect.pm index d7775d4b..d1dca4ef 100644 --- a/lib/PublicInbox/LeiInspect.pm +++ b/lib/PublicInbox/LeiInspect.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # "lei inspect" general purpose inspector for stuff in SQLite and @@ -235,7 +235,8 @@ sub inspect_argv { # via wq_do $lei->{1}->autoflush(0); $lei->out('[') if $multi; while (defined(my $x = shift @$argv)) { - inspect1($lei, $x, scalar(@$argv)) or return; + eval { inspect1($lei, $x, scalar(@$argv)) or return }; + warn "E: $@\n" if $@; } $lei->out(']') if $multi; } -- cgit v1.2.3-24-ge0c7