Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
48092f65
Commit
48092f65
authored
Apr 03, 2013
by
mattijs
Browse files
ENH: PtrList: improved error message
parent
f389b3e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/containers/Lists/PtrList/PtrListI.H
View file @
48092f65
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -132,7 +132,9 @@ inline const T& Foam::PtrList<T>::operator[](const label i) const
if
(
!
ptrs_
[
i
])
{
FatalErrorIn
(
"PtrList::operator[] const"
)
<<
"hanging pointer, cannot dereference"
<<
"hanging pointer at index "
<<
i
<<
" (size "
<<
size
()
<<
"), cannot dereference"
<<
abort
(
FatalError
);
}
...
...
@@ -146,7 +148,9 @@ inline T& Foam::PtrList<T>::operator[](const label i)
if
(
!
ptrs_
[
i
])
{
FatalErrorIn
(
"PtrList::operator[]"
)
<<
"hanging pointer, cannot dereference"
<<
"hanging pointer at index "
<<
i
<<
" (size "
<<
size
()
<<
"), cannot dereference"
<<
abort
(
FatalError
);
}
...
...
src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H
View file @
48092f65
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -107,7 +107,9 @@ inline const T& Foam::UPtrList<T>::operator[](const label i) const
if
(
!
ptrs_
[
i
])
{
FatalErrorIn
(
"UPtrList::operator[] const"
)
<<
"hanging pointer, cannot dereference"
<<
"hanging pointer at index "
<<
i
<<
" (size "
<<
size
()
<<
"), cannot dereference"
<<
abort
(
FatalError
);
}
...
...
@@ -121,7 +123,9 @@ inline T& Foam::UPtrList<T>::operator[](const label i)
if
(
!
ptrs_
[
i
])
{
FatalErrorIn
(
"UPtrList::operator[]"
)
<<
"hanging pointer, cannot dereference"
<<
"hanging pointer at index "
<<
i
<<
" (size "
<<
size
()
<<
"), cannot dereference"
<<
abort
(
FatalError
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment