mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: PtrList,UPtrList: improved debug message
This commit is contained in:
@ -2,7 +2,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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,7 +132,9 @@ inline const T& Foam::PtrList<T>::operator[](const label i) const
|
|||||||
if (!ptrs_[i])
|
if (!ptrs_[i])
|
||||||
{
|
{
|
||||||
FatalErrorIn("PtrList::operator[] const")
|
FatalErrorIn("PtrList::operator[] const")
|
||||||
<< "hanging pointer, cannot dereference"
|
<< "hanging pointer at index " << i
|
||||||
|
<< " (size " << size()
|
||||||
|
<< "), cannot dereference"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +148,9 @@ inline T& Foam::PtrList<T>::operator[](const label i)
|
|||||||
if (!ptrs_[i])
|
if (!ptrs_[i])
|
||||||
{
|
{
|
||||||
FatalErrorIn("PtrList::operator[]")
|
FatalErrorIn("PtrList::operator[]")
|
||||||
<< "hanging pointer, cannot dereference"
|
<< "hanging pointer at index " << i
|
||||||
|
<< " (size " << size()
|
||||||
|
<< "), cannot dereference"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,7 +107,9 @@ inline const T& Foam::UPtrList<T>::operator[](const label i) const
|
|||||||
if (!ptrs_[i])
|
if (!ptrs_[i])
|
||||||
{
|
{
|
||||||
FatalErrorIn("UPtrList::operator[] const")
|
FatalErrorIn("UPtrList::operator[] const")
|
||||||
<< "hanging pointer, cannot dereference"
|
<< "hanging pointer at index " << i
|
||||||
|
<< " (size " << size()
|
||||||
|
<< "), cannot dereference"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +123,9 @@ inline T& Foam::UPtrList<T>::operator[](const label i)
|
|||||||
if (!ptrs_[i])
|
if (!ptrs_[i])
|
||||||
{
|
{
|
||||||
FatalErrorIn("UPtrList::operator[]")
|
FatalErrorIn("UPtrList::operator[]")
|
||||||
<< "hanging pointer, cannot dereference"
|
<< "hanging pointer at index " << i
|
||||||
|
<< " (size " << size()
|
||||||
|
<< "), cannot dereference"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user