Skip to content
Snippets Groups Projects
Commit b7f3ca53 authored by mattijs's avatar mattijs
Browse files

ENH: wmkdep: better error message. See #784.

parent 52bc274b
Branches
Tags
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -471,6 +471,17 @@ static FILE* fopen_file(const char* dirName, const char* fileName) ...@@ -471,6 +471,17 @@ static FILE* fopen_file(const char* dirName, const char* fileName)
file = fopen(fullName, "r"); file = fopen(fullName, "r");
if (!file && errno == EMFILE)
{
fprintf
(
stderr,
EXENAME ": too many open files while opening '%s'\n"
"Please change your open descriptor limit\n",
fullName
);
}
if (file) if (file)
{ {
print_fileName(fullName); print_fileName(fullName);
...@@ -482,6 +493,17 @@ static FILE* fopen_file(const char* dirName, const char* fileName) ...@@ -482,6 +493,17 @@ static FILE* fopen_file(const char* dirName, const char* fileName)
{ {
file = fopen(fileName, "r"); file = fopen(fileName, "r");
if (!file && errno == EMFILE)
{
fprintf
(
stderr,
EXENAME ": too many open files while opening '%s'\n"
"Please change your open descriptor limit\n",
fileName
);
}
if (file) if (file)
{ {
print_fileName(fileName); print_fileName(fileName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment