From 0c34135438fc5454e55f42e6689a6da167e9ed9a Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 26 May 2016 17:40:37 +0100 Subject: [PATCH] SafeFatalIOError: Updated to print correct file and line number Resolves bug-report http://bugs.openfoam.org/view.php?id=2102 Patch contributed by Mattijs Janssens --- src/OpenFOAM/db/error/IOerror.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/error/IOerror.C b/src/OpenFOAM/db/error/IOerror.C index 859ed3246..76974fbf8 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,8 +125,11 @@ void Foam::IOerror::SafeFatalIOError { if (JobInfo::constructed) { - FatalIOErrorInFunction + FatalIOError ( + functionName, + sourceFileName, + sourceFileLineNumber, ioStream ) << msg << Foam::exit(FatalIOError); }