commit ce30fcf5c1a2aad59475e447d9ba0c245221f807
parent bee17936fa4518df079c00e5077ea21d58c2449c
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 20 Oct 2015 16:50:08 +0200
Transform warning messages in error messages
Fix a help typo.
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/sbox_schiff.c b/src/sbox_schiff.c
@@ -346,7 +346,7 @@ cmd_func_help_schiff_sphere
" distribution. This is actually the number of realisations of\n",
" the integration. Default is "STR(NGEOMS)".\n",
"-i PROPERTIES File that lists the radiative properties of the geometries for\n",
-" a set of wavelength. Each line must be formatted as \"W Nr Kr Ne\"\n",
+" a set of wavelengths. Each line must be formatted as \"W Nr Kr Ne\"\n",
" where \"W\" is the wavelength in meter, \"Nr\" and \"Kr\" are\n",
" respectively the real and imaginary parts of the relative\n",
" refractive index, and \"Ne\" the refractive index of the medium.\n",
diff --git a/src/sbox_schiff_optical_properties.c b/src/sbox_schiff_optical_properties.c
@@ -58,7 +58,7 @@ parse_optical_properties
ASSERT(sbox && filename && str && out_props);
if(strlen(str) >= sizeof(buf) - 1/*NULL char*/) {
- logger_print(&sbox->logger, LOG_WARNING,
+ logger_print(&sbox->logger, LOG_ERROR,
"%s:%lu: not enough memory: cannot parse the properties `%s'.\n",
filename, (unsigned long)iline, str);
return RES_MEM_ERR;
@@ -68,14 +68,14 @@ parse_optical_properties
for(i=0, tk=strtok(buf, " \t"); tk && i < 4; ++i, tk=strtok(NULL, " \t")) {
res = sbox_str_to_double(tk, props + i);
if(res != RES_OK) {
- logger_print(&sbox->logger, LOG_WARNING,
+ logger_print(&sbox->logger, LOG_ERROR,
"%s:%lu: cannot read the optical property `%s'.\n",
filename, (unsigned long)iline, tk);
return res;
}
}
if(i < 4) {
- logger_print(&sbox->logger, LOG_WARNING,
+ logger_print(&sbox->logger, LOG_ERROR,
"%s:%lu: not enough optical properties.\n"
"Expect 4 parameters while %d is submitted - `%s'.\n",
filename, (unsigned long)iline, i, str);
@@ -86,7 +86,7 @@ parse_optical_properties
out_props->Kr = props[2];
out_props->Ne = props[3];
if(!sbox_schiff_optical_properties_check(out_props)) {
- logger_print(&sbox->logger, LOG_WARNING,
+ logger_print(&sbox->logger, LOG_ERROR,
"%s:%lu: invalid optical properties `%s'.\n",
filename, (unsigned long)iline, str);
return RES_BAD_ARG;