stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit f937fc2dc2de18eecdd829cbe8a9d48ddddf0a9e
parent 483facf70a1c1ef132a063dbbcf37a30c4dd97e6
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 29 Mar 2022 12:03:32 +0200

Add error-messages on some errors

Diffstat:
Msrc/stardis-compute.c | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/stardis-compute.c b/src/stardis-compute.c @@ -440,7 +440,7 @@ error: if(!stream) { \ res = RES_IO_ERR; \ logger_print(stardis->logger, LOG_ERROR, \ - "Could not open generator's state file ('%s').\n", \ + "Cannot open generator's state file ('%s').\n", \ name); \ goto error; \ } \ @@ -448,7 +448,7 @@ error: res = read_random_generator_state(args.rng_state, stream); \ if(res != RES_OK) { \ logger_print(stardis->logger, LOG_ERROR, \ - "Could not read random generator's state ('%s').\n", \ + "Cannot read random generator's state ('%s').\n", \ name); \ goto error; \ } \ @@ -464,7 +464,7 @@ error: if(!stream) { \ res = RES_IO_ERR; \ logger_print(stardis->logger, LOG_ERROR, \ - "Could not write random generator's state ('%s').\n", \ + "Cannot write random generator's state ('%s').\n", \ name); \ goto error; \ } \ @@ -510,6 +510,8 @@ compute_probe(struct stardis* stardis, struct time* start) ASSERT(!str_is_empty(&stardis->bin_green_filename)); stream = fopen(str_cget(&stardis->bin_green_filename), "wb"); if(!stream) { + logger_print(stardis->logger, LOG_ERROR, + "cannot open file '%s'\n", str_cget(&stardis->bin_green_filename)); res = RES_IO_ERR; goto error; } @@ -755,6 +757,8 @@ compute_probe_on_interface(struct stardis* stardis, struct time* start) ASSERT(!str_is_empty(&stardis->bin_green_filename)); stream = fopen(str_cget(&stardis->bin_green_filename), "wb"); if(!stream) { + logger_print(stardis->logger, LOG_ERROR, + "cannot open file '%s'\n", str_cget(&stardis->bin_green_filename)); res = RES_IO_ERR; goto error; } @@ -1029,6 +1033,8 @@ compute_medium(struct stardis* stardis, struct time* start) ASSERT(!str_is_empty(&stardis->bin_green_filename)); stream = fopen(str_cget(&stardis->bin_green_filename), "wb"); if(!stream) { + logger_print(stardis->logger, LOG_ERROR, + "cannot open file '%s'\n", str_cget(&stardis->bin_green_filename)); res = RES_IO_ERR; goto error; } @@ -1169,6 +1175,8 @@ compute_boundary(struct stardis* stardis, struct time* start) ASSERT(!str_is_empty(&stardis->bin_green_filename)); stream = fopen(str_cget(&stardis->bin_green_filename), "wb"); if(!stream) { + logger_print(stardis->logger, LOG_ERROR, + "cannot open file '%s'\n", str_cget(&stardis->bin_green_filename)); res = RES_IO_ERR; goto error; }