commit eac0546a719853431772f8549c931d43dd1c6ca3
parent c9f7092d6d4e77afb2f7ed7df999edc2c4ef3d01
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 19 Jan 2024 14:12:02 +0100
Add file name to error message printed by WoS algorithm
This helps the caller to identify the part of the solver that is not
working as expected. This also lets the developer know which file to
track what's going on. Perhaps this will become best practice for all
log messages?
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/sdis_heat_path_conductive_wos_Xd.h b/src/sdis_heat_path_conductive_wos_Xd.h
@@ -37,8 +37,8 @@ XD(check_medium_consistency)
/* Check medium consistency */
if(mdm != rwalk->mdm) {
log_err(scn->dev,
- "%s: invalid solid walk. Unexpected medium (position: "FORMAT_VECX").\n",
- FUNC_NAME, SPLITX(rwalk->vtx.P));
+ "%s:%s: invalid solid walk. Unexpected medium (position: "FORMAT_VECX").\n",
+ __FILE__, FUNC_NAME, SPLITX(rwalk->vtx.P));
res = RES_BAD_OP_IRRECOVERABLE;
goto error;
}
@@ -94,9 +94,9 @@ XD(setup_hit_wos)
mdm = side == SDIS_FRONT ? interf->medium_front : interf->medium_back;
if(mdm != rwalk->mdm) {
log_err(scn->dev,
- "%s: the conductive path has reached an invalid interface; "
+ "%s:%s: the conductive path has reached an invalid interface; "
"unexpected medium (position: "FORMAT_VECX"; side: %s).\n",
- FUNC_NAME, SPLITX(tgt), side == SDIS_FRONT ? "front" : "back");
+ __FILE__, FUNC_NAME, SPLITX(tgt), side == SDIS_FRONT ? "front" : "back");
res = RES_BAD_OP_IRRECOVERABLE;
goto error;
}
@@ -147,9 +147,9 @@ XD(setup_hit_rt)
mdm = side == SDIS_FRONT ? interf->medium_front : interf->medium_back;
if(mdm != rwalk->mdm) {
log_err(scn->dev,
- "%s: the conductive path has reached an invalid interface; "
+ "%s:%s: the conductive path has reached an invalid interface; "
"unexpected medium (position: "FORMAT_VECX"; side: %s).\n",
- FUNC_NAME, SPLITX(tgt), side == SDIS_FRONT ? "front" : "back");
+ __FILE__, FUNC_NAME, SPLITX(tgt), side == SDIS_FRONT ? "front" : "back");
res = RES_BAD_OP_IRRECOVERABLE;
goto error;
}
@@ -249,9 +249,9 @@ XD(sample_next_position)
* we don't care to save it. */
if(SXD_HIT_NONE(&hit)) {
log_err(scn->dev,
- "%s: unable to the next diffusive position "
+ "%s:%s: unable to find the next diffusion position "
"(position: "FORMAT_VECX"; direction: "FORMAT_VECX"; distance: %g\n",
- FUNC_NAME, SPLITX(pos), SPLITX(dir), wos_distance);
+ __FILE__, FUNC_NAME, SPLITX(pos), SPLITX(dir), wos_distance);
res = RES_BAD_OP_IRRECOVERABLE;
goto error;
}