From 8fb546d34dd3afc6d8f74ce1263c600b36ad1264 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 11 Jun 2010 10:59:53 +0100 Subject: [PATCH] ENH: IOField,IOList : added name printing in error message. --- src/OpenFOAM/db/IOobjects/IOField/IOField.C | 12 ++++++++---- src/OpenFOAM/db/IOobjects/IOList/IOList.C | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C index 4af4f27073..d5a6a8bec2 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -36,7 +36,8 @@ Foam::IOField::IOField(const IOobject& io) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOField::IOField(const IOobject&)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + << "IOField " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" " but IOField does not support automatic rereading." << endl; } @@ -65,7 +66,8 @@ Foam::IOField::IOField(const IOobject& io, const label size) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOField::IOField(const IOobject&, const label)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + << "IOField " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" " but IOField does not support automatic rereading." << endl; } @@ -98,7 +100,8 @@ Foam::IOField::IOField(const IOobject& io, const Field& f) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOField::IOField(const IOobject&, const Field&)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + << "IOField " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" " but IOField does not support automatic rereading." << endl; } @@ -133,7 +136,8 @@ Foam::IOField::IOField(const IOobject& io, const Xfer >& f) WarningIn ( "IOField::IOField(const IOobject&, const Xfer >&)" - ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + ) << "IOField " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" " but IOField does not support automatic rereading." << endl; } diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index 3e9b785607..ce4a27bc2f 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -36,8 +36,9 @@ Foam::IOList::IOList(const IOobject& io) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOList::IOList(const IOobject&)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" - " but IOField does not support automatic rereading." + << "IOList " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOList does not support automatic rereading." << endl; } if @@ -64,8 +65,9 @@ Foam::IOList::IOList(const IOobject& io, const label size) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOList::IOList(const IOobject&, const label)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" - " but IOField does not support automatic rereading." + << "IOList " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOList does not support automatic rereading." << endl; } if @@ -96,8 +98,9 @@ Foam::IOList::IOList(const IOobject& io, const List& list) if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn("IOList::IOList(const IOobject&, const List&)") - << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" - " but IOField does not support automatic rereading." + << "IOList " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOList does not support automatic rereading." << endl; } @@ -131,8 +134,9 @@ Foam::IOList::IOList(const IOobject& io, const Xfer >& list) WarningIn ( "IOList::IOList(const IOobject&, const Xfer >&)" - ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" - " but IOField does not support automatic rereading." + ) << "IOList " << name() + << " constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOList does not support automatic rereading." << endl; }