Show type of error in CFCUtil_current

This might help to debug mysterious CPAN Testers failures like

http://www.cpantesters.org/cpan/report/19fc2484-8583-11e6-aa8e-960c2aa93d25


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/1c4446a9
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/1c4446a9
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/1c4446a9

Branch: refs/heads/master
Commit: 1c4446a9ec7813446f49caa5609ac82ca96c74f0
Parents: b557bc2
Author: Nick Wellnhofer <[email protected]>
Authored: Thu Sep 29 14:07:21 2016 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Thu Sep 29 14:54:11 2016 +0200

----------------------------------------------------------------------
 compiler/src/CFCUtil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1c4446a9/compiler/src/CFCUtil.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCUtil.c b/compiler/src/CFCUtil.c
index ebd70ff..be33160 100644
--- a/compiler/src/CFCUtil.c
+++ b/compiler/src/CFCUtil.c
@@ -368,7 +368,7 @@ CFCUtil_current(const char *orig, const char *dest) {
     // If the source file is newer than the dest, we're not current.
     struct stat orig_stat;
     if (stat(orig, &orig_stat) == -1) {
-        CFCUtil_die("Missing source file '%s'", orig);
+        CFCUtil_die("Missing source file '%s': %s", orig, strerror(errno));
     }
     if (orig_stat.st_mtime > dest_stat.st_mtime) {
         return false;

Reply via email to