From a59e1d33853706cd2d9c3f02045ce17fcc0c08fc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 3 Nov 2020 13:13:06 -0700 Subject: [PATCH] Avoid the use of 'illegal' in error messages. There is nothing against the law anyone is trying to do, it's just not a valid operation. --- include/deal.II/grid/tria_accessor.templates.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 4ab14d9b6a..aeb62ddc6f 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -300,7 +300,7 @@ InvalidAccessor::InvalidAccessor( const AccessorData *) { Assert(false, - ExcMessage("You are attempting an illegal conversion between " + ExcMessage("You are attempting an invalid conversion between " "iterator/accessor types. The constructor you call " "only exists to make certain template constructs " "easier to write as dimension independent code but " @@ -316,7 +316,7 @@ InvalidAccessor::InvalidAccessor( static_cast &>(i)) { Assert(false, - ExcMessage("You are attempting an illegal conversion between " + ExcMessage("You are attempting an invalid conversion between " "iterator/accessor types. The constructor you call " "only exists to make certain template constructs " "easier to write as dimension independent code but " @@ -1749,14 +1749,12 @@ TriaAccessor::set_boundary_id( { Assert(structdim < dim, ExcImpossibleInDim(dim)); Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - Assert( - boundary_ind != numbers::internal_face_boundary_id, - ExcMessage( - "You are trying to set the boundary_id to an illegal value (numbers::internal_face_boundary_id is reserved).")); - Assert( - this->at_boundary(), - ExcMessage( - "You are trying to set the boundary_id of an internal object, which is illegal!")); + Assert(boundary_ind != numbers::internal_face_boundary_id, + ExcMessage("You are trying to set the boundary_id to an invalid " + "value (numbers::internal_face_boundary_id is reserved).")); + Assert(this->at_boundary(), + ExcMessage("You are trying to set the boundary_id of an " + "internal object, which is not allowed!")); this->objects().boundary_or_material_id[this->present_index].boundary_id = boundary_ind; -- 2.39.5