From c9929e95f6268d6fb09e8035879a192df81c13e6 Mon Sep 17 00:00:00 2001 From: Daniel Bergman Date: Wed, 5 Mar 2025 12:37:53 -0500 Subject: [PATCH] when asym divs probs sum to >1, exit with msg previously, used `throw` but the standard `main.cpp` catches the exception and still exits with 0 --- core/PhysiCell_standard_models.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/PhysiCell_standard_models.cpp b/core/PhysiCell_standard_models.cpp index 48a70ccb8..0eb533ef8 100644 --- a/core/PhysiCell_standard_models.cpp +++ b/core/PhysiCell_standard_models.cpp @@ -1382,7 +1382,8 @@ void standard_asymmetric_division_function( Cell* pCell_parent, Cell* pCell_daug double sym_div_prob = pCell_parent->phenotype.cycle.asymmetric_division.asymmetric_division_probabilities[pCell_parent->type] + 1.0 - total; if (sym_div_prob < 0.0) { - throw std::runtime_error("Error: Asymmetric division probabilities for " + pCD_parent->name + " sum to greater than 1.0 and cannot be normalized."); + std::cerr << "Error: Asymmetric division probabilities for " + pCD_parent->name + " sum to greater than 1.0 and cannot be normalized." << std::endl; + exit(-1); } pCell_parent->phenotype.cycle.asymmetric_division.asymmetric_division_probabilities[pCell_parent->type] = sym_div_prob; pCell_daughter->phenotype.cycle.asymmetric_division.asymmetric_division_probabilities[pCell_daughter->type] = sym_div_prob;