From 6cb1ffbb0c8669ce4942fa0380b0004a35db885d Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 11 Jan 2019 17:04:44 +0000 Subject: Improve error reporting when a file given on the command line cannot be opened: * Mention the filename. * Report the errno for the file itself, not the one with .gz appended. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 1f738439..36eb565d 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.317 2019/01/10 06:29:00 schwarze Exp $ */ +/* $Id: main.c,v 1.318 2019/01/11 17:04:44 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze @@ -561,7 +561,7 @@ main(int argc, char *argv[]) } } else mandoc_msg(MANDOCERR_FILE, 0, 0, - "%s", strerror(errno)); + "%s: %s", thisarg, strerror(errno)); if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK) break; -- cgit v1.2.3-56-ge451