From: Wolfgang Bangerth Date: Tue, 3 Nov 2020 20:13:06 +0000 (-0700) Subject: Avoid the use of 'illegal' in error messages. X-Git-Tag: v9.3.0-rc1~936^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a59e1d33853706cd2d9c3f02045ce17fcc0c08fc;p=dealii.git 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. --- 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;