mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
OpenFOAM library: Add better error messaging from compound token transfer
This commit is contained in:
@ -63,11 +63,11 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New
|
||||
|
||||
if (cstrIter == IstreamConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("token::compound::New(const word&, Istream&)")
|
||||
FatalIOErrorIn("token::compound::New(const word&, Istream&)", is)
|
||||
<< "Unknown compound type " << compoundType << nl << nl
|
||||
<< "Valid compound types:" << endl
|
||||
<< IstreamConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
<< abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<Foam::token::compound>(cstrIter()(is));
|
||||
@ -86,15 +86,15 @@ bool Foam::token::compound::isCompound(const word& name)
|
||||
}
|
||||
|
||||
|
||||
Foam::token::compound& Foam::token::transferCompoundToken()
|
||||
Foam::token::compound& Foam::token::transferCompoundToken(const Istream& is)
|
||||
{
|
||||
if (type_ == COMPOUND)
|
||||
{
|
||||
if (compoundTokenPtr_->empty())
|
||||
{
|
||||
FatalErrorIn("token::transferCompoundToken()")
|
||||
FatalIOErrorIn("token::transferCompoundToken(const Istream& is)", is)
|
||||
<< "compound has already been transfered from token\n "
|
||||
<< info() << abort(FatalError);
|
||||
<< info() << abort(FatalIOError);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user