[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61829] [libdriver] unhelpful diagnostics when font nonexistent
From: |
G. Branden Robinson |
Subject: |
[bug #61829] [libdriver] unhelpful diagnostics when font nonexistent |
Date: |
Sat, 15 Jan 2022 03:01:11 -0500 (EST) |
User-agent: |
Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/3.6.7 |
URL:
<https://savannah.gnu.org/bugs/?61829>
Summary: [libdriver] unhelpful diagnostics when font
nonexistent
Project: GNU troff
Submitted by: gbranden
Submitted on: Sat 15 Jan 2022 08:01:09 AM UTC
Category: Device - others/general
Severity: 2 - Minor
Item Group: Warning/Suspicious behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
When processing intermediate output, diagnostic messages are not
as helpful as they could be. They are excusable in groff
1.22.4, but my refactoring last September made the font library
a bit quieter in its inner reaches, where it doesn't know how
serious problems are. I'll have good news about that later.
First, here's groff 1.22.4 behavior.
$ cat EXPERIMENTS/bad_font.out
x T utf8
x res 240 24 40
x init
p1
x font 1 R
x font 2 I_DO_NOT_EXIST
$ grotty EXPERIMENTS/bad_font.out
grotty:EXPERIMENTS/bad_font.out:6: can't find font file 'I_DO_NOT_EXIST'
grotty:EXPERIMENTS/bad_font.out:6: fatal error: sorry, I can't continue
We have two diagnostic messages where really we need only one.
On the bright side, not only the line number but the text of the
first message make it clear what is wrong.
However, some font library refactoring (commit 2dff87d3ed, 17
September) tidied this up in a way that causes some collateral
frustration.
$ ./build/grotty -F font -F build/font EXPERIMENTS/bad_font.out
./build/grotty:EXPERIMENTS/bad_font.out:6: fatal error: sorry, I can't
continue
However, it turns out that the immediate context of this
terrible diagnostic message in fact knows everything it needs
to. Here's the result of a patch I have in preparation.
$ ./build/grotty -F font -F build/font EXPERIMENTS/bad_font.out
./build/grotty:EXPERIMENTS/bad_font.out:6: fatal error: cannot find font
'I_DO_NOT_EXIST'
That's more like it--one step back, but two steps forward.
(I'm dithering over whether to include the word "file" after
"font". See [https://savannah.gnu.org/bugs/?61423#comment9
comment #9 to Savannah ticket #61423] for why.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61829>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61829] [libdriver] unhelpful diagnostics when font nonexistent,
G. Branden Robinson <=