[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/13: [grn]: Emit error when failing to open file.
From: |
G. Branden Robinson |
Subject: |
[groff] 09/13: [grn]: Emit error when failing to open file. |
Date: |
Sat, 16 Apr 2022 04:37:33 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 646539bc119e7dd838851deb77877c64d82241e7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Apr 15 08:32:44 2022 +1000
[grn]: Emit error when failing to open file.
* src/preproc/grn/main.cpp (conv): Throw an error diagnostic when
failing to open a Gremlin picture file.
---
ChangeLog | 5 +++++
src/preproc/grn/main.cpp | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 55aacc86..fe3d227a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/preproc/grn/main.cpp (conv): Throw an error diagnostic
+ when failing to open a Gremlin picture file.
+
2022-04-14 G. Branden Robinson <g.branden.robinson@gmail.com>
[man]: Fix extraneous space when `ME` or `UE` given extraneous
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp
index c4a57a49..fcc22896 100644
--- a/src/preproc/grn/main.cpp
+++ b/src/preproc/grn/main.cpp
@@ -567,8 +567,10 @@ conv(FILE *fp,
}
char *path;
gfp = macro_path.open_file(gremlinfile, &path);
- if (!gfp)
+ if (0 /* nullptr */ == gfp) {
+ error("cannot open picture file '%1'", gremlinfile);
return;
+ }
PICTURE = DBRead(gfp); /* read picture file */
fclose(gfp);
free(path);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/13: [grn]: Emit error when failing to open file.,
G. Branden Robinson <=