/**
* Exception
*/
- DeclException0 (ExcDereferenceInvalidObject);
+ DeclException1 (ExcDereferenceInvalidObject,
+ TriaRawIterator,
+ << "You tried to dereference an iterator for which this "
+ << "is not possible. More information on this iterator: "
+ << "level=" << arg1.accessor.level()
+ << ", index=" << arg1.accessor.index()
+ << ", state="
+ << (arg1.state() == IteratorState::valid ? "valid" :
+ (arg1.state() == IteratorState::past_the_end ?
+ "past_the_end" : "invalid")));
/**
* Exception
*/
const Accessor &
TriaRawIterator<dim,Accessor>::operator * () const
{
- Assert (state() == IteratorState::valid, ExcDereferenceInvalidObject());
+ Assert (state() == IteratorState::valid,
+ ExcDereferenceInvalidObject(*this));
return accessor;
};
Accessor &
TriaRawIterator<dim,Accessor>::operator * ()
{
- Assert (state() == IteratorState::valid, ExcDereferenceInvalidObject());
+ Assert (state() == IteratorState::valid,
+ ExcDereferenceInvalidObject(*this));
return accessor;
};
bool
TriaRawIterator<dim,Accessor>::operator < (const TriaRawIterator &i) const
{
- Assert (state() != IteratorState::invalid, ExcDereferenceInvalidObject());
- Assert (i.state() != IteratorState::invalid, ExcDereferenceInvalidObject());
+ Assert (state() != IteratorState::invalid,
+ ExcDereferenceInvalidObject(*this));
+ Assert (i.state() != IteratorState::invalid,
+ ExcDereferenceInvalidObject(i));
Assert (&accessor.get_triangulation() == &i.accessor.get_triangulation(),
ExcInvalidComparison());