From c9504f6ec360cb4b23c142e06db4e390b98d9bcb Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 5 Aug 2020 21:46:11 -0600 Subject: [PATCH] Simplify some string handling in an error message. This was triggered by the fact that the original string lacked a space after 'assign'. --- source/particles/particle.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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(), -- 2.39.5