summaryrefslogtreecommitdiff
path: root/src/preproc/grn
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2021-09-16 04:00:26 +1000
committerG. Branden Robinson <g.branden.robinson@gmail.com>2021-09-16 04:09:48 +1000
commit6e79a0e06401af9ec18162a65912df06a94c0cda (patch)
tree096eaf130c7a0665e8a7e1eb6465524a04407cc6 /src/preproc/grn
parentd0cfa32a4b0086ea26d09bf8babc37b0747222d0 (diff)
downloadgroff-git-6e79a0e06401af9ec18162a65912df06a94c0cda.tar.gz
[grn, groff, troff]: Improve fatal diagnostics.
[grn, groff, troff]: Communicate better when device DESC file can't be loaded. * src/libs/libgroff/font.cpp (font::load_desc): Stop writing diagnostic to standard error. * src/preproc/grn/main.cpp (getres): * src/roff/troff/troff.cpp (main): Replace "sorry, I can't continue" fatal diagnostic with a more informative message. Instead say which device's DESC file the program was trying to open, which might reveal a user's logic error or typo. * src/roff/groff/groff.cpp (main): Replace "invalid device" text of fatal diagnostic similarly. I think it is more helpful to indicate the operation that failed rather than saying the device was invalid, particularly since there are other ways for a device to be invalid even if a DESC file is found and loaded.
Diffstat (limited to 'src/preproc/grn')
-rw-r--r--src/preproc/grn/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp
index 3a2e332a9..c4a57a49f 100644
--- a/src/preproc/grn/main.cpp
+++ b/src/preproc/grn/main.cpp
@@ -429,7 +429,8 @@ getres()
int linepiece;
if (!font::load_desc())
- fatal("sorry, I can't continue");
+ fatal("cannot load 'DESC' description file for device '%1'",
+ device);
res = font::res;