From baf6fc9f10aa751b786021ef9b23ac546881b699 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 29 Sep 2009 16:16:55 +1000 Subject: Improve error reporting when qdoc cannot open a source file. Make the user's life easier by including the reason for the error in the failure message. Reviewed-by: Trust Me --- tools/qdoc3/cppcodeparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 4b5f0c6..ec5ce96 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -47,6 +47,7 @@ #include #include +#include #include "codechunk.h" #include "config.h" @@ -281,7 +282,7 @@ void CppCodeParser::parseSourceFile(const Location& location, { FILE *in = fopen(QFile::encodeName(filePath), "r"); if (!in) { - location.error(tr("Cannot open C++ source file '%1'").arg(filePath)); + location.error(tr("Cannot open C++ source file '%1' (%2)").arg(filePath).arg(strerror(errno))); return; } -- cgit v0.12