From: Wolfgang Bangerth Date: Thu, 6 Aug 2020 03:46:11 +0000 (-0600) Subject: Simplify some string handling in an error message. X-Git-Tag: v9.3.0-rc1~1211^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9504f6ec360cb4b23c142e06db4e390b98d9bcb;p=dealii.git Simplify some string handling in an error message. This was triggered by the fact that the original string lacked a space after 'assign'. --- diff --git a/source/particles/particle.cc b/source/particles/particle.cc index 5773db6dc1..b3f20809fb 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -303,16 +303,14 @@ namespace Particles const ArrayView old_properties = property_pool->get_properties(properties); - Assert( - new_properties.size() == old_properties.size(), - ExcMessage( - std::string( - "You are trying to assign properties with an incompatible length. ") + - "The particle has space to store " + - std::to_string(old_properties.size()) + " properties, " + - "and this function tries to assign" + - std::to_string(new_properties.size()) + " properties. " + - "This is not allowed.")); + Assert(new_properties.size() == old_properties.size(), + ExcMessage( + "You are trying to assign properties with an incompatible length. " + "The particle has space to store " + + std::to_string(old_properties.size()) + + " properties, but you are trying to assign " + + std::to_string(new_properties.size()) + + " properties. This is not allowed.")); if (old_properties.size() > 0) std::copy(new_properties.begin(),