* mdocml: When opening mandoc.db fails, tell the user in which directory.
@ 2014-12-06 1:23 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-06 1:23 UTC (permalink / raw)
To: source
Log Message:
-----------
When opening mandoc.db fails, tell the user in which directory.
Improving an unhelpful error message reported by millert@.
Modified Files:
--------------
mdocml:
mansearch.c
Revision Data
-------------
Index: mansearch.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -Lmansearch.c -Lmansearch.c -u -p -r1.51 -r1.52
--- mansearch.c
+++ mansearch.c
@@ -21,6 +21,7 @@
#include <sys/types.h>
#include <assert.h>
+#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <limits.h>
@@ -246,7 +247,8 @@ mansearch(const struct mansearch *search
SQLITE_OPEN_READONLY, NULL);
if (SQLITE_OK != c) {
- perror(MANDOC_DB);
+ fprintf(stderr, "%s/%s: %s\n",
+ paths->paths[i], MANDOC_DB, strerror(errno));
sqlite3_close(db);
continue;
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-06 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-06 1:23 mdocml: When opening mandoc.db fails, tell the user in which directory schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).