Minor changes in debug output, added information

to error messages
This commit is contained in:
2024-03-15 15:49:40 +01:00
parent 55c51f8434
commit 2fccef7132
19 changed files with 41 additions and 32 deletions
+7 -6
View File
@@ -43,7 +43,7 @@ void addInteractions(
std::string target_name =
json_string(json_object_by_path(value, {"Target"}));
DEBUG_LEVEL_3("with target" + target_name);
DEBUG_LEVEL_3("with target " + target_name);
std::shared_ptr<species::Specie> target =
findTarget(target_name, tracked_species, background_species);
@@ -180,7 +180,7 @@ void addInteractions(
ionization_energy_distribution, scattering_angle_distribution,
ionization_energy_eV));
} else {
ERROR("This ionization model is not implemented.");
ERROR("This ionization model is not implemented: " + ionization_model);
}
} else if (type == "Excitation") {
DEBUG_LEVEL_2("Adding interactions: Excitation");
@@ -228,6 +228,7 @@ void addInteractions(
specie->addInteraction(std::shared_ptr<interaction::Interaction>(
new interaction::ChargeExchange(cross_section, target)));
} else if (type == "Recombination") {
DEBUG_LEVEL_2("Adding interactions: Recombination");
std::string target_name =
json_string(json_object_by_path(value, {"Target"}));
std::shared_ptr<species::TrackedSpecie> target =
@@ -305,7 +306,7 @@ std::function<double(double)> buildTotalCrossSection(json_t* object) {
json_object_by_path(object, {"ExcitationFunction", "ExcitationState"}));
return buildExcitationCrossSection(excitation_state);
} else {
ERROR("This type of cross section is not implemented");
ERROR("This type of cross section is not implemented.");
return nullptr;
}
}
@@ -443,7 +444,7 @@ std::function<double(double)> buildExcitationCrossSection(
} else {
ERROR(
"This type of cross section ExcitationState is not implemented in "
"buildExcitationCrossSection.");
"buildExcitationCrossSection: " + excitation_state);
return nullptr;
}
}
@@ -513,7 +514,7 @@ std::shared_ptr<species::Specie> findTarget(
} else if (tracked_species.count(target_name)) {
return tracked_species.at(target_name);
} else {
ERROR("The specified target does not exist.");
ERROR("The specified target " + target_name + " does not exist.");
return nullptr;
}
};
@@ -525,7 +526,7 @@ std::shared_ptr<species::TrackedSpecie> findTracked(
if (tracked_species.count(target_name)) {
return tracked_species.at(target_name);
} else {
ERROR("The specified target does not exist.");
ERROR("The specified target " + target_name + " does not exist.");
return nullptr;
}
}